Sockets aren't exactly implemented the same way across multiple platforms. To achieve a cross-platform program that uses sockets, you can either use compile time switches (#defines) to use the appropriate platform-specific calls and system libraries or use a third party library that already has this compile time switching internally. A few cross-platform socket libraries: 0) http://zeromq.org/[^] 1) www.boost.org (asio library)[^] 2) Larger frameworks have this too (Qt[^], wxWidgets[^])