Apollo  6.0
Open source self driving car software
server.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <unordered_set>
10 
11 #include "boost/asio.hpp"
13 
14 class Node;
15 
16 class Server : public std::enable_shared_from_this<Server> {
17  public:
18  explicit Server(Node* node);
19  ~Server();
20 
21  void run();
22 
23  private:
24  Node& node;
25  Clients clients;
26 
27  boost::asio::io_service io;
28  boost::asio::signal_set signals;
29 
30  boost::asio::ip::tcp::endpoint endpoint;
31  boost::asio::ip::tcp::acceptor acceptor;
32  boost::asio::ip::tcp::socket socket;
33 
34  void stop(const boost::system::error_code& error, int signal_number);
35 
36  void begin_accept();
37  void end_accept(const boost::system::error_code& ec);
38 };
Definition: clients.h:16
Server(Node *node)
Definition: server.h:16
Definition: node.h:31
void run()