I am writing a server, to be remotly connected through a telnet client.
Now, the problem is that when I type a single char in the telnet client, it doesn't waits for me to hit ENTER, but sends it right away.
My question is: how can I make my program wait until ENTER is been pressed in the telnet client, so the entire string before I hitted ENTER will be saved in a single string variable (in the server).
I tried this, but no luck...
while (msg[0]!='\n')
recv(sockfd, msg, 100, 0);
I'm still new to network programming;
Please help, thanks in advance.



LinkBack URL
About LinkBacks


