in reply to Creating a TCP client, that receives and responds in individual packets

It is difficult for an application to control sending individual packets over TCP. The server could be using UDP, which does use single packets, or it could be using a protocol with messages over a TCP stream. With the TCP server, use the low-level sysread/syswrite to make sure that you don't block waiting for data.
  • Comment on Re: Creating a TCP client, that receives and responds in individual packets

Replies are listed 'Best First'.
Re: Re: Creating a TCP client, that receives and responds in individual packets
by pg (Canon) on Nov 11, 2002 at 19:32 UTC
    Here involves two different concepts:
    1. TCP reassembles all packets, and that is transparent to the end programmer.
    2. When your application reads from buffer, it shall take care of the boundary between packets.