CTRL-M (^M) characters in data read from sockets
Hi,
We have developed a software applications which opens upto 300 TCP connections and 4000 UDP sockets. The data from the TCP application is multiplexed to UDP sockets and viceversa.
We connect to the application using a TCP socket and send certain data to the application which in turns sends this data to all the 4000 UDP sockets. The data received from 4000 UDP sockets is in turn sent back to the TCP socket as responses.
We used telnet to connecct to thespecific TCP port on our application, sent a request to be sent to all 4000 UDP sockets and noticed ctrl-M characters in the data received from TCP socket. However we are sure we are not appending or adding this ctrl-m character while sending the data on TCP socket.
telnet host port >/tmp/abc
send a request
send next request
(after 10 mins, close connection)
cat -vet /tmp/abc >/tmp/xyz
There are ctrl-m characters in /tmp/xyz.
^M is observed only at the end of few lines and not on all lines. Successive repeatition of this test generates ^M in different lines but at the end of the line always.
Can anybody help me to know why these ^M characters are getting generated?
Note: We are completely working on Solaris and do not move contents across Windows and Unix. Our application is completely written on C++
Thanks.
Message was edited by:
shekhnam

