Skip to content

Commit 98357e9

Browse files
authored
Update README.md
1 parent 320719b commit 98357e9

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

server/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# websocket server
2+
3+
Simple example of the **multithreaded** websocket echo server. Build with oat++ (AKA oatpp) web framework.
4+
5+
See more:
6+
7+
- [Oat++ Website](https://oatpp.io/)
8+
- [Oat++ Github Repository](https://github.com/oatpp/oatpp)
9+
- [Get Started With Oat++](https://oatpp.io/docs/start)
10+
11+
## Overview
12+
13+
### Project layout
14+
15+
```
16+
|- CMakeLists.txt // projects CMakeLists.txt
17+
|- src/
18+
| |
19+
| |- controller/
20+
| | |
21+
| | |- MyController.hpp // ApiController with websocket endpoint
22+
| |
23+
| |- websocket/
24+
| | |
25+
| | |- WSListener.hpp // WebSocket listeners are defined here
26+
| |
27+
| |- AppComponent.hpp // Application config.
28+
| |- App.cpp // main() is here
29+
|
30+
|- utility/install-oatpp-modules.sh // utility script to install required oatpp-modules.
31+
```
32+
33+
## Build and Run
34+
35+
### Using CMake
36+
37+
**Requires:** [oatpp](https://github.com/oatpp/oatpp), and [oatpp-websocket](https://github.com/oatpp/oatpp-websocket)
38+
modules installed. You may run `utility/install-oatpp-modules.sh`
39+
script to install required oatpp modules.
40+
41+
After all dependencies satisfied:
42+
43+
```
44+
$ mkdir build && cd build
45+
$ cmake ..
46+
$ make
47+
$ ./websocket-server-exe # - run application.
48+
```

0 commit comments

Comments
 (0)