r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
INetworkServer.hpp
Go to the documentation of this file.
1///
2/// @file INetworkServer.hpp
3/// @brief This file contains the server network interface
4/// @namespace srv
5///
6
7#pragma once
8
9#include <cstdint>
10#include <functional>
11#include <string>
12#include <vector>
13
16
17namespace srv
18{
19
20 constexpr size_t MAX_CLIENTS = 16;
21 constexpr size_t MAX_IP_LENGTH = 8;
22 constexpr size_t MAX_LEN_RECV_BUFFER = 1024;
23
24 ///
25 /// @class INetworkServer
26 /// @brief Interface for the server network
27 /// @namespace srv
28 ///
30 {
31 public:
32 virtual ~INetworkServer() = default;
33
34 virtual void init(const std::string &host, uint16_t port) = 0;
35 virtual void start() = 0;
36 virtual void stop() = 0;
37
38 // Configuration
39 virtual void setTickRate(std::uint16_t tickRate) = 0;
40 virtual void setServerCapabilities(std::uint32_t caps) = 0;
41
42 private:
43 }; // class INetworkServer
44
45} // namespace srv
This file contains the plugin interface.
This file contains the network protocol.
Interface for the server network.
virtual void setServerCapabilities(std::uint32_t caps)=0
virtual void stop()=0
virtual ~INetworkServer()=default
virtual void setTickRate(std::uint16_t tickRate)=0
virtual void init(const std::string &host, uint16_t port)=0
virtual void start()=0
Interface for plugins.
Definition IPlugin.hpp:29
constexpr size_t MAX_CLIENTS
constexpr size_t MAX_IP_LENGTH
constexpr size_t MAX_LEN_RECV_BUFFER