Re: How can I prevent TCP/IP from grouping together multiple SendText requests into one packet?





jklimek@xxxxxxxxx wrote:

Right now my client sends the word "UPDATE" to my server and the server then sends a bunch of packets (tstringlist) that contain artist name, track name, etc.

The problem is that I'm using Socket.SendText() so fast that TCP/IP is
grouping lots of SendText requests into one TCP/IP packet and then it
gets very hard to parse them on the client...


TCP is a stream, you have no control over how it arranges the bytes in the stream. You will find that the bytes get 'packetized' in lots of strange and interesting ways depending on the situation of the moment. You will have to put things into the stream that allows the client to pars ethe answer (EG a length before each answer). You will also ahev to teach the client to read bytes until it gets what it needs regardless of how the stream got "packetized".
.




Relevant Pages

  • Re: VOIP Softphone
    ... The application receives a data stream off the network. ... spaced out every 50 milliseconds which equates to 800 bytes of audio data. ... in my application by either dropping packets if they are to late, ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: read() returns ETIMEDOUT on steady TCP connection
    ... I'am also meet this problem in my mss server(missey streaming server). ... What is unusual is that this is happening right in the middle of sending a steady stream of data with no network congestion. ... The likelihood of this happening seems to increase as the number of audience connections increases. ... all packets received are delivered to the upper layer. ...
    (freebsd-net)
  • Re: read() returns ETIMEDOUT on steady TCP connection
    ... I'am also meet this problem in my mss server(missey streaming server). ... What is unusual is that this is happening right in the middle of sending a steady stream of data with no network congestion. ... The likelihood of this happening seems to increase as the number of audience connections increases. ... all packets received are delivered to the upper layer. ...
    (freebsd-net)
  • Re: read() returns ETIMEDOUT on steady TCP connection
    ... I'am also meet this problem in my mss server(missey streaming server). ... I'm are having a trouble with TCP connections being dropped with "read: ... the middle of sending a steady stream of data with no network congestion. ... all packets received are delivered ...
    (freebsd-net)
  • Re: vaporware LOS question
    ... enter a store at the exact same time and the packets arrive at the server at the ... Also, TCP is connection oriented, not necessarily stream oriented. ... The issue of "oops, my stream has backed up packets, and the player wants to ...
    (rec.games.roguelike.development)