post processing

This commit is contained in:
j3d1 2016-10-05 20:53:37 +02:00
parent fc7213fe03
commit f15213db1b
5 changed files with 129 additions and 10 deletions

21
game/network/server.cpp Normal file
View file

@ -0,0 +1,21 @@
#define ASIO_STANDALONE
#include "server.hpp"
#include <memory>
void Server::do_accept()
{
m_acceptor.async_accept(m_socket,
[this](std::error_code ec)
{
if (!ec)
{
auto s = std::make_shared<Session>(std::move(m_socket),state);
m_sessions.push_back(s);
s->start();
}
do_accept();
});
}