- The server will open port 4000
- The client will connect to port 4000
- The server sends a nice message to the client
- The client displays the message on the console
- Both programs terminate
To compile with MinGW on windows:
g++ -o client.exe client.cpp -lws2_32
g++ -o server.exe server.cpp -lws2_32
To compile on linux:
g++ -o client client.cpp
g++ -o server server.cpp
Enjoy.
Why is this usefull? Let's see:[list][*]Activity! There hasn't been any for months.
[*]Cross platform!
[*]The networking threshold is crossed, so we'll never have to look at this problem again.[/list]