From: Dave Thomas Date: 2001-12-27T00:54:52+09:00 Subject: [ruby-talk:29445] Re: Surprise (?) with sockets Thomas Hurst writes: > SOL_TCP is defined only if it's defined by the OS headers, where as > IPPROTO_TCP is defined always (as the value the OS provides if it's > there, or hardcoded to a magic number if not), at least in 1.6.6. You have to love consistency. I'd always assumed the SOL_xxx variants were the ones to use for the 'level' parameter, but digging through Stevens it looks like the level field is a real mess: IPROTO_TCP is the correct one to use. I'll add it to the errata. Many thanks Dave