Network Socket Code Examples These programs can be build on Linux or Mac OS X machines with: g++ -I. tinyclient.cpp -o tinyclient g++ -I. tinyserver.cpp -o tinyserver g++ -I. twoserver.cpp -o twoserver g++ -I. vulnserver.cpp -o vulnserver g++ -I. vulnclient.cpp -o vulnclient g++ -I. webclient.cpp -o webclient g++ -I. webserver.cpp -o webserver (the -I. lets g++ find osl/socket.h) And on Windows machines with (once you've got Visual Studio in your PATH): cl.exe /EHsc /I. tinyclient.cpp cl.exe /EHsc /I. tinyserver.cpp cl.exe /EHsc /I. twoserver.cpp cl.exe /EHsc /I. vulnclient.cpp cl.exe /EHsc /I. vulnserver.cpp cl.exe /EHsc /I. webclient.cpp cl.exe /EHsc /I. webserver.cpp (the /EHsc turns on C++ exception handling) You need to run the server before running the client. I use two windows, and start the server in the left window, then the client in the right window. Windows XP SP2 will ask if you'd like to block the server from opening a server socket; you'll of course have to unblock it to actually connect. Try running the webserver example, and then point your web browser at http://localhost:1234. All these servers and clients are hardcoded to use port 1234.