My program works in such a way that I would benefit from the TCP_NODELAY
option. I read and understand why a developer might not want to
enable/disable this setting.
This code works on Windows but not on CE. On CE, if I set the value to 1
and read it back, then the value is 8. When using a network analyzer, I can
see that this setting has no effect on CE whereas it works perfectly on
Windows.
Any ideas?
int on=944; // any value but 1 or 0
int len = sizeof( on );
getsockopt( Socket, IPPROTO_TCP, TCP_NODELAY, (char *)&on, &len );
// on equals 0
on = 1;
setsockopt( Socket, IPPROTO_TCP, TCP_NODELAY, (char *)&on,
sizeof(on) );
int len = sizeof( on );
getsockopt( Socket, IPPROTO_TCP, TCP_NODELAY, (char *)&on, &len );
// on equals 1 on Windows, but it equals 8 on CE