1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/lib/network/NetworkHandler.h

32 lines
786 B
C++
Raw Normal View History

2024-01-12 01:10:41 +02:00
/*
* 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;
2024-01-12 16:55:36 +02:00
void connectToRemote(INetworkClientListener & listener, const std::string & host, uint16_t port) override;
2024-01-12 01:10:41 +02:00
void createTimer(INetworkTimerListener & listener, std::chrono::milliseconds duration) override;
void run() override;
void stop() override;
};
VCMI_LIB_NAMESPACE_END