|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
Interface for network operations. More...
#include <INetwork.hpp>
Public Member Functions | |
| virtual | ~INetwork ()=default |
| Virtual destructor. | |
| virtual void | start (void)=0 |
| Start the network on the specified port. | |
| virtual void | stop (void)=0 |
| Stop the network. | |
| virtual std::optional< NetworkEvent > | pollEvent (void)=0 |
| Poll for a network event. | |
Interface for network operations.
This interface defines the essential network operations such as starting/stopping the network, sending packets, broadcasting packets, and polling for network events.
Definition at line 46 of file INetwork.hpp.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Poll for a network event.
| event | Reference to store the polled network event |
Implemented in rtp::client::ClientNetwork, and rtp::server::ServerNetwork.
|
pure virtual |
Start the network on the specified port.
| port | Port number to start the network on |
Implemented in rtp::client::ClientNetwork, and rtp::server::ServerNetwork.
|
pure virtual |
Stop the network.
Implemented in rtp::client::ClientNetwork, and rtp::server::ServerNetwork.