Sign in to follow this  
hiigara

Where do I set TCP_NODELAY?

Recommended Posts

Quote:
Original post by hiigara
In the client socket or in the server socket?

The Naggle algorithm is on both ends of a connection. The sender, specifically, is the one affected by the naggle algorithm.
Quote:
Before the socket is connected or after?

You need a valid socket in order to set the option, so generally after calling socket(), or accept() on the server's end, iirc.

Share this post


Link to post
Share on other sites
You can call it whenever you want to. In fact, you can turn it on or off at any time.

Specifically, TCP_NODELAY affects how the networking stack does buffering. When it is set, then the network will try to send the data as soon as possible. Note that it's not guaranteed to be sent directly -- for example, the TCP send window may already be full. When it is cleared, TCP will attempt to buffer data until it has a full segment, or until approximately one estimated round-trip-time has elapsed (or some other time-out as deemed by the implementation), in order to improve send efficiency and reduce silly windows syndrome. (There are other SWS avoidance measures in a TCP implementation, too)

Share this post


Link to post
Share on other sites
Thanks. I am not expecting a big difference, since the game is a mix of turn based and real time, but every little helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by Antheus
Quote:
Original post by hplus0603

silly windows syndrome.


Freudian slip?


Depends on how long the condition lasts for. Once it happens, it tends to generate more than one window that is silly :-)

Share this post


Link to post
Share on other sites
Quote:
Original post by Antheus
Freudian slip?

I'm surprised you didn't point out Washu's naggle Freudian slip. [lol]

Not that I'm really trying to, because for every one slip Washu makes, I probably have 1000 more!

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
Quote:
Original post by Antheus
Freudian slip?

I'm surprised you didn't point out Washu's naggle Freudian slip. [lol]

Not that I'm really trying to, because for every one slip Washu makes, I probably have 1000 more!


I wonder do the tentacles help with Washu's lower than average error rate...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this