Hi,
Im trying to make a server app that can be telneted into. It works in that i can connect to it and i recive "welcome to server" and "User:" but i then want the user name to be typed then recived by the program. So after "User:" is displayed i told the program to recieve, im not sure if thats right. But when I type 1 character in without pressing enter the program recieves that letter and then disconnects me. How do i fix this so that a whole word can be enterend in the client and then the server will get the whole word into the varible r_buffer?
Thanks for any helpCode:char msgs[200] = "Welcome To Server\r\n"; r = send(sock2, msgs, strlen(msgs),0); strcpy(msgs, "User:\r\n"); r = send(sock2, msgs, strlen(msgs),0); char r_buffer[20]; r = recv(sock2, r_buffer, 20, 0); r_buffer[r] = 0; MessageBox(hWnd, r_buffer, "Prog", NULL);
Cheers
TNT



LinkBack URL
About LinkBacks



