Re: [Dev-C++] Socket Programming - Newbie - sockaddr 16 bytes?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel K. O. <dan...@ya...> - 2004-11-06 20:11:57
|
Obi wrote: > m_listenSocket = socket( AF_INET, SOCK_STREAM, 0 ); This is not right. Never call socket() with an AF_ argument; it should be PF_ (PF_INET in this case). AF_INET just "works" here by coincidence, because most of the BSD-sockets implementations use the same value for them. This is just as correct as using "socket(2, 1, 0);". Daniel K. O. |