post processing
This commit is contained in:
parent
fc7213fe03
commit
f15213db1b
5 changed files with 129 additions and 10 deletions
21
game/network/server.cpp
Normal file
21
game/network/server.cpp
Normal 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();
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue