TCP Programming problems with 'recv'

Hey,

I am learning to program a TCP server and managed to get it up and running (I am using Windows 98SE).

I can use the send function to send information to the client and I can use the recv function to ask the user to pass information through, but when I do so it only allows the client to send one character and then adds a load of jibberish symbols to the string.

I think the problem may have to do with the flags (I am using 0), but this is what I have:

recv(ServerDesc,ClientInput,30,0);

Could someone please tell me what I am doing wrong, or if there is an easier way to do what I'm trying to do? Any advice would be fantastic.

Paul

When you create a TCP/IP connection the received side and the transmit side work together, when playing client-server.

If you use a TCP socket to send 100 bytes and you use a TCP socket to receive 100 bytes or more, you are ok.

If the client socket sends one byte / char at a time (like TELNET does) then you will only receive one byte / char at a time.