A simple websockets server built in C++ with the CRT, "windows.h", and Winsock. No CLR or MFC is used.
For learning purposes.
Added a very simple HTTP GET request client in C/C++, built using winsock. See httpclient.h.
As described on
Added a simple HTTP server that can accept multiple, concurrent client connections. Displays the entire raw HTTP request header. Useful for debugging applications e.g. .NET apps that use HttpWebRequest, or any client app. that makes HTTP requests.
The program now demonstrates reproducible race condition and deadlock scenarios. The websocket client is run in a browser and sends the server a message, then asserts that the message echoed back from the serer is equal to the one sent. The
program is contained within the new, added files:
Instructions to run:
- run the websocket server program (e.g. websockets-server-race-conditions.cpp) in Visual Studio, then once the server is listening,
- run multiple websockets client by opening websockets-client.html in many instances of Firefox or Chrome.
This project is more fully explained by my article on CodeProject:
Learn more about HTML5 and Websockets here: