Re: TCP_NODELAY at loopback interface
- From: "Helge Kruse" <Helge.Kruse-nospam@xxxxxxx>
- Date: Fri, 17 Jul 2009 09:32:32 +0200
Remi,
I expected that the Nagle algorithm would affect connections at the loopback
interface. But with some benchmarks did not show any effect by this option.
It looks like all packets are sent immediately. Probably I will disable
Nagle to keep this under all circumstances.
I cant find how SO_SNDBUF could speed up transmission. I only found that:
"A value of 0 is not supported."
in the Windows CE 5.0 documentation.
As Paul wrote, I will treat the value 8 as a not-null value, what is legal
for a BOOL i C language. I just was curious about the meaning of "eight".
Unfortunately I dont have the sources.
Regards,
Helge
"R. de Gravelaine" <g_r_a_v_e_l_a_i_n_e_@xxxxxxxxxxx> wrote in message
news:%234hIQXhBKHA.4376@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
1) Don't really know but setting TCP_NODELAY should do no harm. My feeling
is that there is a potentiality for the TCP stack to "speed-up" some
operations when using the loopback interface but that unless this
behaviour is proven, Nagle's algorithm should be disabled if you fear that
some buffer rearrangement or retention occurs. Please note that setting
SO_SNDBUF to 0 can also have a strong impact on the way your socket packs
data to be sent.
2) This is quite strange. Even if TCP_NODELAY value was returned in
bDisableNagle, it should be 0x0001. Did you check the value returned for
getsockopt?
Remi
Helge Kruse a écrit :
Hello,
the WINCE 5.0 Winsock socket option TCP_NODELAY should control, if the
Nagle
algorithm is activated or not. The nagle alrorithm should delay
transmission
of short segments and send one segments, that contains all the short
chunks.
see http://msdn.microsoft.com/en-us/library/aa450065.aspx
1) Does the Nagel algorithm also works for the Loopback interface
127.0.0.1?
How is the term "data already in flight" to be read?
2) The function getsockopt returns the current value of the winsock
option.
What does it mean, when I get the result 8 (eight), when I have set the
value before to 1 (one)?
Here are the functions with parameters I use:
BOOL bDisableNagle;
int nSize;
::setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&bDisableNagle,
sizeof(BOOL));
nSize = sizeof(BOOL);
::getsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&bDisableNagle,
&nSize);
Regards,
Helge
.
- Follow-Ups:
- Re: TCP_NODELAY at loopback interface
- From: R. de Gravelaine
- Re: TCP_NODELAY at loopback interface
- References:
- TCP_NODELAY at loopback interface
- From: Helge Kruse
- Re: TCP_NODELAY at loopback interface
- From: R. de Gravelaine
- TCP_NODELAY at loopback interface
- Prev by Date: RE: Preserving User Certificates across Software Updates
- Next by Date: How to add Touch driver in WinCE 5.0/6.0 Emulator OS image?
- Previous by thread: Re: TCP_NODELAY at loopback interface
- Next by thread: Re: TCP_NODELAY at loopback interface
- Index(es):
Relevant Pages
|