summaryrefslogtreecommitdiff
path: root/server/tcpserver.h
blob: 5d0cbbab5cf932f03ed51a26c87c46e14a336389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef TCPSERVER_H
#define TCPSERVER_H

#include <boost/asio.hpp>

#include "connection.h"

class TCPServer {
	private:
		boost::asio::ip::tcp::acceptor acceptor_;
		
		//! Listen for incoming connection.
		void listen();
		
		//! Handle new connection.
		void handle_connection(Connection::p connection, const boost::system::error_code& error);
		
	public:
		TCPServer(boost::asio::io_service& io_service);
};

#endif