I'm porting some code that works when compiled with VS.NET 2003 and run under XP but has different results when compiled with VS 2012 and run under Windows 7.
int l_BufferSize = sizeof( BOOL );char l_pNagle[sizeof( BOOL )];
int result = getsockopt( m_Socket,
IPPROTO_TCP,
TCP_NODELAY,
l_pNagle,
&l_BufferSize );
assert( sizeof( BOOL ) == static_cast<unsigned int>( l_BufferSize ) );
The documentation for getsockopt says the size of the buffer needed to contain the TCP_NODELAY data is the size of a BOOL. Under XP this was 4 bytes. Under Win 7 it appears to be 1 byte.
Is this the correct size and the documentation is out of date or am I experiencing a bug.
Thanks for any help.