aboutsummaryrefslogtreecommitdiff
path: root/network-handler/networkhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'network-handler/networkhandler.cpp')
-rw-r--r--network-handler/networkhandler.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/network-handler/networkhandler.cpp b/network-handler/networkhandler.cpp
deleted file mode 100644
index 614d270..0000000
--- a/network-handler/networkhandler.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "networkhandler.hpp"
-
-#include <boost/bind.hpp>
-#include <boost/asio/placeholders.hpp>
-
-#include <memory>
-#include <iostream>
-
-NetworkHandler::NetworkHandler(const ListenSettings& listen_settings)
-: io_service()
-, server(io_service, listen_settings, [this](boost::asio::ip::tcp::socket&& socket){accept_handler(std::move(socket));})
-, clients()
-{}
-
-void NetworkHandler::accept_handler(boost::asio::ip::tcp::socket&& socket)
-{
- std::list<UserClient>::iterator it = clients.emplace(clients.end(), std::move(socket));
- clients.back().on_done(
- [this, it]() {
- clients.erase(it);
- }
- );
-
- clients.back().receive();
-}
-
-void NetworkHandler::run()
-{
- io_service.run();
-}
-
-