i'm pretty confused about some weird behavior i'm seeing with the
socket routines on a couple hamm machines. i've written a simple dumb
server to demonstrate the behavior, and i'll attach it below.
basically, it opens a socket and tries to bind it to a specific port.
the wierd thing is that bind
serverSockName.sin_port = port;
And you telling me that you actually write networking software? :)
Every book would tell you that you should do
serverSockName.sin_port = htons(port);
(Yes, on Solaris it would work even without htons() since hton?() functions
do nothing, host order coinside
2 matches
Mail list logo