This project contains two executables which allow the user to control the connections and message flow for Simple-WebSocket-Server. It might be useful for testing interoperability with other websockets implementations.
s : Start server
t : sTop server
m : send Message to all clients
q : Quit
s : Set up connection
l : cLose connection
c : stop Client
m : send Message
q : Quit
Run one server and as many clients as you like. Type the letter for the desired action and hit enter. A typical session might look like this:
| sample_client | sample_server | Effect |
|---|---|---|
| Start | The server starts listening for connections | |
| Start | The client connects to the server | |
| Message | The client sends a message to the server (the server will respond with an echo) | |
| Message | The server sends a message to all connected clients (they will not respond) | |
| cLose | The client disconnects with a message | |
| sTop | The server stops listening | |
| sTop | The client cleans itself up | |
| Quit | The client quits | |
| Quit | The server quits |
The sample uses Simple-WebSocket-Server (duh). You'll need its dependencies installed.
Populate the following environmentla variables:
| variable | value |
|---|---|
| BoostRoot | C:\path\to\Boost |
| BoostVer | 1_62 |
| OpenSSLRoot | C:\path\to\OpenSSL |
Specify the correct generator in your call to cmake, this example uses 2017 with a 64 bit build:
mkdir build
cd build
cmake .. -G "Visual Studio 15 2017 Win64"
Open in your IDE of choice build/Simple_WebSocket_Sample.sln and build it.
mkdir build
cd build
cmake ..