Re: Reducing latency in TCP-based streams
Re: Reducing latency in TCP-based streams
- Subject: Re: Reducing latency in TCP-based streams
- From: email@hidden (David E. Gelhar)
- Date: 11 Mar 2009 08:56:58 -0400
--- email@hidden wrote:
You can force that. An application can force delivery of segments to the output
stream using the push operation provided by TCP and setting the PSH flag to ensure
that data will be delivered immediately to the application layer by the receiving
transport layer. This is how telnet sends single keystrokes, for example.
That's an interesting point Marshall .. in fact, you seem to have explained just
"how Telnet does it," which is great.
(Perhaps that technique is enough to solve Thomas' problem at hand?)
What are the actual methods or code used in a Mac or iFone milieu for these "push
operation and the PSH flag" thingies of which you speak?
--- end of quote ---
Actually, I believe the Nagle algorithm as specified in RFC896 (send the first
keystroke right away, but combine subsequent ones until the first one is ACK'd)
overrides the PSH flag.
You can, however, disable it using TCP_NODELAY.
Here's an example of doing that with BSD sockets:
http://www.unixguide.net/network/socketfaq/2.16.shtml
Just make sure you read the associated disclaimer:
TCP_NODELAY is for a specific purpose; to disable the Nagle buffering
algorithm. It should only be set for applications that send frequent
small bursts of information without getting an immediate response,
where timely delivery of data is required (the canonical example is
mouse movements)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden