https://github.com/runner365/cpp_websocket
websocket client/server is written by c++11
https://github.com/runner365/cpp_websocket
Last synced: 3 months ago
JSON representation
websocket client/server is written by c++11
- Host: GitHub
- URL: https://github.com/runner365/cpp_websocket
- Owner: runner365
- License: mit
- Created: 2024-10-19T03:10:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T06:33:49.000Z (over 1 year ago)
- Last Synced: 2025-05-04T13:58:06.304Z (about 1 year ago)
- Language: C++
- Size: 24.4 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
English | [中文](README_cn.md)
# CPP_WebSocket
The websocket client and server are developed in c++11, based on the libuv high-performance asynchronous network library, and have the characteristics of asynchronous high concurrency.
## websocket server
Support high-performance websocket service
* Based on libuv high-performance network asynchronous concurrency
* Support websocket bin/text data sending and receiving
* Support websocket based on http (unencrypted)
* Support websocket based on https (encrypted)
* Support subsequent websocket custom development
Here is a server demo: [ws_server_demo](src/tools/ws_server_demo.cpp)
## websocket client
Support various common functions of websocket client
* Based on libuv high-performance network asynchronous concurrency
* Support data input within libuv thread
* Support data input outside libuv thread
* Support websocket based on http (unencrypted)
* Support websocket based on https (encrypted)
* Support subsequent websocket custom development
Here are the client demos:
* [ws_client_demo](src/tools/ws_client_demo.cpp): A demo of libuv internal thread sending data.
* [ws_client_demo](src/tools/ws_client_asnyc_demo.cpp): A demo of libuv external thread sending data.
## How to compile (linux/macos)
Compilation uses cmake, which requires cmake 3.7.1 or above
```
mkdir objs
cd objs
cmake ..
make
```