https://github.com/willbasky/chatsocket
Multi language implementation of simple chat with websockets for educational purposes
https://github.com/willbasky/chatsocket
Last synced: 11 months ago
JSON representation
Multi language implementation of simple chat with websockets for educational purposes
- Host: GitHub
- URL: https://github.com/willbasky/chatsocket
- Owner: willbasky
- License: bsd-3-clause
- Created: 2023-07-05T00:43:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T04:48:26.000Z (almost 3 years ago)
- Last Synced: 2025-03-12T21:17:14.309Z (over 1 year ago)
- Language: Haskell
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chatsocket
Multi language implementation of simple chat with websockets for educational purposes
## Features
1. Many clients can be run
2. Time measurement for every roundtrip (message - acknowledgement)
3. Server send messages individually to every client
## Roadmap
- [x] Haskell
- [ ] PureScript
- [x] Ocaml
- [ ] Python
- [ ] TypeScript
- [ ] Rust
- [ ] Kotlin
## How to use
### Haskell
```shell
stack run server
```
in another tab of the console:
```shell
stack run client
```
In client type further message to register client:
Hi! I am
### Ocaml
Run server:
```shell
dune exec -- chatsocket -s
```
Run client in another tab of the console:
```shell
dune exec -- chatsocket
```
## Functionality
### Haskell
1. Sending p2p messages with format: user # message
2. Counting time of roundtrip for common messages
### Ocaml
1. Sending p2p messages with int message. For example 0hello
2. Counting time of roundtrip for common messages
3. Command id#ping return pong from opponent
4. Command id#close on server closes client, on client asks server to send Close signal and close client.