This project requires:
- C++17 or newer
- Boost == 1.68 (1.7 introduces changes to library functions that affect the project and people in class had issue with compiling with 1.66)
- CMake >= 3.12
- NCurses (only tested with 6.1)
First run the chat server on an unused port of the server machine. The server
also takes an HTML file that it will server to standard http requests for
index.html.
bin/chatserver 4000 ../web-socket-networking/webchat.html
In separate terminals, run multiple instances of the chat client using:
bin/chatclient localhost 4000
This will connect to the given port (4000 in this case) of the local machine.
Connecting to a remote machine can be done by explicitly using the remote
machine's IP address instead of localhost. Inside the chat client, you can
enter commands or chat with other clients by typing text and hitting the
ENTER key. You can disconnect from the server by typing quit. You can shut
down the server and disconnect all clients by typing shutdown. Typing
anything else will send a chat message to other clients.
A browser based interface can be accessed by opening the URL
http://localhost:4000/index.html. The server will respond with the
specified web page above. By clicking Connect, the page gains access to
chat on the server via web sockets in browsers that support web sockets.