File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed
Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ Asynchronous [Boost.Asio](https://www.boost.org/doc/libs/1_74_0/doc/html/boost_a
1515#include < iostream>
1616#include < thread>
1717
18- // ...
19-
2018struct : TcpServer::Observer {
2119 void onConnectionAccepted(int id) {
2220 std::cout << "New client connected with id " << id << std::endl;
@@ -42,16 +40,13 @@ server.listen(protocol, port);
4240
4341server.startAcceptingConnections();
4442
45- //...
4643```
4744### Client
4845```cpp
4946#include <TcpClient.hpp>
5047#include <iostream>
5148#include <thread>
5249
53- //...
54-
5550struct : TcpClient::Observer {
5651 void onConnected() { std::cout << "Client was connected" << std::endl; };
5752 void onReceived(const char* data, size_t size) {
@@ -73,5 +68,4 @@ constexpr uint16_t port{1234};
7368auto address{boost::asio::ip::address::from_string("127.0.0.1")};
7469client.connect({address, port});
7570
76- //...
7771```
You can’t perform that action at this time.
0 commit comments