[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: simple server?



>   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 with network order there, which is not the
case on Intel architecture).

Good luck,


Alex Y.
-- 
   _ 
 _( )_
(     (o___           +-------------------------------------------+
 |      _ 7           |            Alexander Yukhimets            |
  \    (")            |       http://pages.nyu.edu/~aqy6633/      |
  /     \ \           +-------------------------------------------+


Reply to: