1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
vcmi/lib/network/NetworkHandler.h
2024-01-19 23:52:28 +02:00

32 lines
786 B
C++

/*
* NetworkHandler.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "NetworkDefines.h"
VCMI_LIB_NAMESPACE_BEGIN
class NetworkHandler : public INetworkHandler
{
std::shared_ptr<NetworkContext> io;
public:
NetworkHandler();
std::unique_ptr<INetworkServer> createServerTCP(INetworkServerListener & listener) override;
void connectToRemote(INetworkClientListener & listener, const std::string & host, uint16_t port) override;
void createTimer(INetworkTimerListener & listener, std::chrono::milliseconds duration) override;
void run() override;
void stop() override;
};
VCMI_LIB_NAMESPACE_END