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



<jklimek@xxxxxxxxx> wrote in message
news:1130271306.996963.41680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[...]
> 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...

We told you this. There are no TCP packets, there is only a TCP stream.
If it's hard to parse, it's because you made it so. If you send
"name=value" pairs, each terminated by a CRLF, you can buffer the
stream as you receive it, checking each time you receive anything if
there is a CRLF in your buffer, and if there is you know you have a
complete name-value pair at the front of the buffer. Repeat until
bored.

How do you know the response for a single UPDATE command is finished?
Perhaps you need an empty line at the end.

Groetjes,
Maarten Wiltink


.



Relevant Pages

  • Re: Diagnose co-location networking problem
    ... it was from the client. ... Actually there's significant indication of lost packets and clues that ... 540 retransmit timeouts ... are you using any packetfiltering on the server? ...
    (freebsd-net)
  • Re: Socket switch delay
    ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
    (microsoft.public.win32.programmer.networks)
  • Re: process stuck in nfsfsync state
    ... >> server is wedged, not the client. ... Comparing the client and server traces, it looks like fragments in the ... loss for individual packets adds up. ...
    (freebsd-stable)
  • Re: TDS vs. TCP
    ... I start capturing the network traffic between SQL ... Server and the client. ... I don't see any TDS packets but the communication between SQL ... stand-a-lone server and the client, ...
    (microsoft.public.sqlserver.clustering)
  • Re: DHCP
    ... DHCPINFORM is used only if the client has ... >>> I would run ethereal on the server and catch all the packets exchanged ... >>> between the client and server. ... > implies that the host has a "working" IP address. ...
    (comp.os.linux.networking)