KlassischeKeplerKriege/game/network/server.cpp
2016-10-05 20:53:37 +02:00

21 lines
427 B
C++

#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();
});
}