https://github.com/iamazeem/tcpclientserverapp
Sample asynchronous protocol-based TCP client and server apps using C++ and Boost::Asio
https://github.com/iamazeem/tcpclientserverapp
asio async-tcp-client boost-asio client-server cpp cpp11 hacktoberfest protocol tcp-client tcp-server
Last synced: 4 months ago
JSON representation
Sample asynchronous protocol-based TCP client and server apps using C++ and Boost::Asio
- Host: GitHub
- URL: https://github.com/iamazeem/tcpclientserverapp
- Owner: iamazeem
- License: mit
- Created: 2016-06-24T09:55:14.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-06-25T17:52:47.000Z (over 1 year ago)
- Last Synced: 2024-06-25T19:45:15.531Z (over 1 year ago)
- Topics: asio, async-tcp-client, boost-asio, client-server, cpp, cpp11, hacktoberfest, protocol, tcp-client, tcp-server
- Language: C++
- Homepage: https://github.com/iamAzeem/TcpClientServerApp
- Size: 74.2 KB
- Stars: 41
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TcpClientServerApp
[](https://github.com/iamazeem/TcpClientServerApp/actions/workflows/ci.yml)
[](./LICENSE)
Sample asynchronous protocol-based
[TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) client and
server apps using C++ and
[Boost::Asio](https://www.boost.org/doc/libs/1_76_0/doc/html/boost_asio.html)
```mermaid
sequenceDiagram
autonumber
participant client
participant server
client-->>server: connect
server->>client: welcome
client->>server: command
activate server
note right of server: execute
server->>client: output
deactivate server
client->>server: exit
server--xclient: disconnect
```
## Dependencies
- C++11 or above
- [Boost::Asio](https://www.boost.org/doc/libs/1_76_0/doc/html/boost_asio.html)
- [CMake](https://cmake.org/)
## Build
```shell
git clone --recursive git@github.com:iamazeem/TcpClientServerApp.git
cd TcpClientServerApp
cmake -S . -B build
cmake --build build
```
The client and server binaries will be generated under `build` directory:
- `./build/server/server`
- `./build/client/client`
## Run
Run `server` on one terminal:
```shell
./build/server/server
```
Run `client` on another terminal:
```shell
./build/client/client
```
## License
[MIT](./LICENSE)