https://github.com/tinawebdev/skillbox-chat-server
Simple Chat Server using Sockets
https://github.com/tinawebdev/skillbox-chat-server
chat-server cpp-chat uwebsockets websocket
Last synced: 6 months ago
JSON representation
Simple Chat Server using Sockets
- Host: GitHub
- URL: https://github.com/tinawebdev/skillbox-chat-server
- Owner: tinawebdev
- Created: 2021-01-20T17:33:03.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-06T17:39:11.000Z (almost 5 years ago)
- Last Synced: 2025-02-22T18:50:58.136Z (about 1 year ago)
- Topics: chat-server, cpp-chat, uwebsockets, websocket
- Language: C++
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# skillbox-chat-server
Simple Chat Server using Sockets
## Requirements
[uWebSockets](https://github.com/uNetworking/uWebSockets)
## Usage examples with the browser console
**1. New connection**
```js
ws = new WebSocket("ws://localhost:8888/");
ws.onmessage = ({data}) => console.log(data);
```
**2. Setting your name**
```js
ws.send("SET_NAME::name");
```
**3. Sending direct message**
```js
ws.send("DIRECT::11::text message");
```
**3. Sending broadcast message**
```js
ws.send("TOALL::text message");
```
***
*Made with C++ Workshop from [Skillbox](https://www.youtube.com/channel/UCHJZFCpwlXV7Sie1dV6pQLw).*