Platform Data Engine 0.0.1
A data-driven game engine for platformers
PlatformDataEngine::NetworkHandler Class Referenceabstract

Base class for a network handler, responsible for handling network operations Example: Server, Client, etc. More...

#include <NetworkHandler.h>

Inheritance diagram for PlatformDataEngine::NetworkHandler:
PlatformDataEngine::Client PlatformDataEngine::Server

Public Member Functions

const std::string & getId ()
 
void setId (const std::string &name)
 
virtual void start ()=0
 
virtual void stop ()=0
 
virtual void process (GameWorld *world)=0
 Process is responsible for sending packets, limited in rate More...
 
virtual void recieve (GameWorld *world)=0
 Recieve checks for new packets, not limited in rate More...
 
std::shared_ptr< ConnectiongetConnection ()
 Gets the current process connection More...
 
void setConnection (std::shared_ptr< Connection > conn)
 Sets the current process connection More...
 

Protected Attributes

std::shared_ptr< Connectionm_clientConnection
 

Detailed Description

Base class for a network handler, responsible for handling network operations Example: Server, Client, etc.

Member Function Documentation

◆ getConnection()

std::shared_ptr< Connection > PlatformDataEngine::NetworkHandler::getConnection ( )
inline

Gets the current process connection

Returns

◆ process()

virtual void PlatformDataEngine::NetworkHandler::process ( GameWorld world)
pure virtual

Process is responsible for sending packets, limited in rate

Parameters
world

Implemented in PlatformDataEngine::Client, and PlatformDataEngine::Server.

◆ recieve()

virtual void PlatformDataEngine::NetworkHandler::recieve ( GameWorld world)
pure virtual

Recieve checks for new packets, not limited in rate

Parameters
world

Implemented in PlatformDataEngine::Client, and PlatformDataEngine::Server.

◆ setConnection()

void PlatformDataEngine::NetworkHandler::setConnection ( std::shared_ptr< Connection conn)
inline

Sets the current process connection

Parameters
conn

◆ start()

virtual void PlatformDataEngine::NetworkHandler::start ( )
pure virtual

◆ stop()

virtual void PlatformDataEngine::NetworkHandler::stop ( )
pure virtual

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