minichat is a minimalistic one-on-one server-client chat application implemented in OCaml. It serves as a simple example of network communication and concurrency in OCaml.
It currently only supports Linux-based OS (I assume it can run on other Unix-based OS as well, but not tested).
- Clone the Repository:
git clone https://github.com/jalsol/minichat.git
cd minichat- Install Dependencies:
Use opam to install the required dependencies:
opam install . --deps-only- Build the Project:
Compile the project using Dune:
dune buildThis will generate the executable in the _build directory.
- Start the Server:
On a server, run the application in server mode:
dune exec -- minichat -m server -p <port>The server will start and listen for incoming client connections.
- Start a Client:
In another machine/terminal session, run the application in client mode:
dune exec -- minichat -m client -h <address> -p <port>- Chat:
Type messages in either the server or the client terminal, and press Enter to send. Messages will appear at the recipient end. The sender end will also display the RTT.
This project is licensed under The Unlicense. See the LICENSE file for details.
