◆ count_server()
count_server::count_server |
( |
| ) |
|
|
inline |
Definition at line 15 of file simple_count_server_thread.cpp.
15 : m_count(0) {
16 m_server.init_asio();
17
20 }
void on_open(connection_hdl hdl)
void on_close(connection_hdl hdl)
void set_open_handler(open_handler h)
void set_close_handler(close_handler h)
◆ count()
void count_server::count |
( |
| ) |
|
|
inline |
Definition at line 32 of file simple_count_server_thread.cpp.
32 {
33 while (1) {
34 sleep(1);
35 m_count++;
36
39
40 std::lock_guard<std::mutex>
lock(m_mutex);
41 for (auto it : m_connections) {
43 }
44 }
45 }
void send(connection_hdl hdl, std::string const &payload, frame::opcode::value op, lib::error_code &ec)
Create a message and add it to the outgoing send queue (exception free)
static const Segment ss(Segment::ss)
◆ on_close()
◆ on_open()
◆ run()
Definition at line 47 of file simple_count_server_thread.cpp.
47 {
48 m_server.listen(port);
50 m_server.run();
51 }
void start_accept(lib::error_code &ec)
Starts the server's async connection acceptance loop (exception free)
The documentation for this class was generated from the following file: