Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::net::INetwork Class Referenceabstract

Interface for network operations. More...

#include <INetwork.hpp>

Inheritance diagram for rtp::net::INetwork:
Collaboration diagram for rtp::net::INetwork:

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< NetworkEventpollEvent (void)=0
 Poll for a network event.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~INetwork()

virtual rtp::net::INetwork::~INetwork ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ pollEvent()

virtual std::optional< NetworkEvent > rtp::net::INetwork::pollEvent ( void  )
pure virtual

Poll for a network event.

Parameters
eventReference to store the polled network event
Returns
True if an event was polled, false otherwise

Implemented in rtp::client::ClientNetwork, and rtp::server::ServerNetwork.

◆ start()

virtual void rtp::net::INetwork::start ( void  )
pure virtual

Start the network on the specified port.

Parameters
portPort number to start the network on

Implemented in rtp::client::ClientNetwork, and rtp::server::ServerNetwork.

◆ stop()

virtual void rtp::net::INetwork::stop ( void  )
pure virtual

Stop the network.

Implemented in rtp::client::ClientNetwork, and rtp::server::ServerNetwork.


The documentation for this class was generated from the following file: