Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::NetworkModuleTCP Class Reference
Inheritance diagram for Burger::NetworkModuleTCP:
Collaboration diagram for Burger::NetworkModuleTCP:

Public Member Functions

 NetworkModuleTCP (NetworkManager *pNetworkManager)
 
virtual ~NetworkModuleTCP ()
 
virtual eError GetInfo (NetworkModuleInfo_t *pOutput) const
 
virtual NetworkEndpointNewEndpoint (void)
 
virtual NetworkModuleSettingsNewSettings (uint32_t uGameID, const char *pGameName)
 
virtual eError NotificationLock (eSocketFlags uFlags)
 Obtain the module lock.
 
virtual eError NotificationUnlock (eSocketFlags uFlags)
 Release the module lock.
 
void PingHostSocket (void)
 
- Public Member Functions inherited from Burger::NetworkModule
const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 
 NetworkModule (NetworkManager *pNetworkManager, eNetworkProtocol uType)
 Base constructor for a NetworkModule.
 
virtual ~NetworkModule ()
 Base destructor for a NetworkModule.
 
ForwardLinkGetForwardLink (void)
 
uint_t IsAllocated (void) const
 
eNetworkProtocol GetType (void) const
 
NetworkManagerGetNetworkManager (void) const
 
void Poll (void) noexcept
 
- Public Member Functions inherited from Burger::Base
const char * get_class_name (void) const noexcept
 Get the name of the class.
 
virtual ~Base () noexcept=default
 Destructor.
 

Static Public Member Functions

static NetworkModuleTCPNew (NetworkManager *pNetworkManager)
 
- Static Public Member Functions inherited from Burger::NetworkModule
static NetworkModuleFixup (ForwardLink *pInput)
 

Public Attributes

Mutex m_NotificationLock
 Message lock.
 
Mutex m_ListLock
 Linked list lock.
 
Mutex m_WaitLock
 Event reply lock.
 
Thread m_WorkerThread
 Background thread.
 
SocketType m_uSocketServer
 Host socket.
 
SocketType m_uSocketWakeupServer
 Special socket that can send messages to the server to cancel select() calls.
 
NetworkEndpointInstanceTCPm_pActiveEndpointList
 Linked list of active endpoints.
 
uint32_t m_uEndpointListState
 Increment every time m_pActiveEndpointList is modified.
 
uint_t m_uServerPort
 Port for the server.
 
uint_t m_uMinimumPort
 Lowest port to scan for.
 
uint_t m_uMaximumPort
 Highest port to scan for.
 
uint_t m_bStartedNetworkManager
 TRUE if the NetworkManager.Init() call was issued
 
volatile uint32_t m_bAbortThread
 Set to TRUE to have the background thread to shut down.
 

Static Public Attributes

static const uint_t kMaxDatagamSize = 65507
 
static const uint_t kDefaultServerPort = 20764
 
static const uint_t kDefaultMinimumPort = 2300
 Default DirectPlay minimum listen port.
 
static const uint_t kDefaultMaximumPort = 2400
 Default DirectPlay maximum listen port.
 
- Static Public Attributes inherited from Burger::NetworkModule
static const Burger::StaticRTTI g_StaticRTTI
 
static const uint32_t kVersion = 0x100
 Version 1.0.
 
- Static Public Attributes inherited from Burger::Base
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 

Protected Member Functions

eError InitPingSockets (void)
 
void ShutdownPingSockets (void)
 
eError InitBackgroundThread (void)
 
void ShutdownBackgroundThread (void)
 

Static Protected Member Functions

static uintptr_t WorkerThread (void *pThis)
 

Private Member Functions

 NetworkModuleTCP (const NetworkModuleTCP &)=delete
 
NetworkModuleTCPoperator= (const NetworkModuleTCP &)=delete
 
 NetworkModuleTCP (NetworkModuleTCP &&)=delete
 
NetworkModuleTCPoperator= (NetworkModuleTCP &&)=delete
 

Additional Inherited Members

- Protected Attributes inherited from Burger::NetworkModule
ForwardLink m_NextModule
 Next module in the linked list.
 
NetworkManagerm_pNetworkManager
 Parent network manager.
 
uint_t m_bAllocated
 Was allocated using New()
 
eNetworkProtocol m_uType
 Module type.
 

Constructor & Destructor Documentation

◆ NetworkModuleTCP() [1/3]

Burger::NetworkModuleTCP::NetworkModuleTCP ( const NetworkModuleTCP & )
privatedelete

◆ NetworkModuleTCP() [2/3]

Burger::NetworkModuleTCP::NetworkModuleTCP ( NetworkModuleTCP && )
privatedelete

◆ NetworkModuleTCP() [3/3]

Burger::NetworkModuleTCP::NetworkModuleTCP ( NetworkManager * pNetworkManager)

◆ ~NetworkModuleTCP()

virtual Burger::NetworkModuleTCP::~NetworkModuleTCP ( )
virtual

Member Function Documentation

◆ GetInfo()

virtual eError Burger::NetworkModuleTCP::GetInfo ( NetworkModuleInfo_t * pOutput) const
virtual

Implements Burger::NetworkModule.

◆ InitBackgroundThread()

eError Burger::NetworkModuleTCP::InitBackgroundThread ( void )
protected

◆ InitPingSockets()

eError Burger::NetworkModuleTCP::InitPingSockets ( void )
protected

◆ New()

static NetworkModuleTCP * Burger::NetworkModuleTCP::New ( NetworkManager * pNetworkManager)
static

◆ NewEndpoint()

virtual NetworkEndpoint * Burger::NetworkModuleTCP::NewEndpoint ( void )
virtual

Implements Burger::NetworkModule.

◆ NewSettings()

virtual NetworkModuleSettings * Burger::NetworkModuleTCP::NewSettings ( uint32_t uGameID,
const char * pGameName )
virtual

Implements Burger::NetworkModule.

◆ NotificationLock()

virtual eError Burger::NetworkModuleTCP::NotificationLock ( eSocketFlags uFlags)
virtual

Obtain the module lock.


Parameters
uFlagsWhich lock is requested, the datagram or the stream?
Returns
Zero if no error, non-zero on error.

Reimplemented from Burger::NetworkModule.

◆ NotificationUnlock()

virtual eError Burger::NetworkModuleTCP::NotificationUnlock ( eSocketFlags uFlags)
virtual

Release the module lock.


Parameters
uFlagsWhich lock is requested, the datagram or the stream?
Returns
Zero if no error, non-zero on error.

Reimplemented from Burger::NetworkModule.

◆ operator=() [1/2]

NetworkModuleTCP & Burger::NetworkModuleTCP::operator= ( const NetworkModuleTCP & )
privatedelete

◆ operator=() [2/2]

NetworkModuleTCP & Burger::NetworkModuleTCP::operator= ( NetworkModuleTCP && )
privatedelete

◆ PingHostSocket()

void Burger::NetworkModuleTCP::PingHostSocket ( void )

◆ ShutdownBackgroundThread()

void Burger::NetworkModuleTCP::ShutdownBackgroundThread ( void )
protected

◆ ShutdownPingSockets()

void Burger::NetworkModuleTCP::ShutdownPingSockets ( void )
protected

◆ WorkerThread()

static uintptr_t Burger::NetworkModuleTCP::WorkerThread ( void * pThis)
staticprotected

Member Data Documentation

◆ kDefaultMaximumPort

const uint_t Burger::NetworkModuleTCP::kDefaultMaximumPort = 2400
static

Default DirectPlay maximum listen port.

◆ kDefaultMinimumPort

const uint_t Burger::NetworkModuleTCP::kDefaultMinimumPort = 2300
static

Default DirectPlay minimum listen port.

◆ kDefaultServerPort

const uint_t Burger::NetworkModuleTCP::kDefaultServerPort = 20764
static

◆ kMaxDatagamSize

const uint_t Burger::NetworkModuleTCP::kMaxDatagamSize = 65507
static

◆ m_bAbortThread

volatile uint32_t Burger::NetworkModuleTCP::m_bAbortThread

Set to TRUE to have the background thread to shut down.

◆ m_bStartedNetworkManager

uint_t Burger::NetworkModuleTCP::m_bStartedNetworkManager

TRUE if the NetworkManager.Init() call was issued

◆ m_ListLock

Mutex Burger::NetworkModuleTCP::m_ListLock

Linked list lock.

◆ m_NotificationLock

Mutex Burger::NetworkModuleTCP::m_NotificationLock

Message lock.

◆ m_pActiveEndpointList

NetworkEndpointInstanceTCP* Burger::NetworkModuleTCP::m_pActiveEndpointList

Linked list of active endpoints.

◆ m_uEndpointListState

uint32_t Burger::NetworkModuleTCP::m_uEndpointListState

Increment every time m_pActiveEndpointList is modified.

◆ m_uMaximumPort

uint_t Burger::NetworkModuleTCP::m_uMaximumPort

Highest port to scan for.

◆ m_uMinimumPort

uint_t Burger::NetworkModuleTCP::m_uMinimumPort

Lowest port to scan for.

◆ m_uServerPort

uint_t Burger::NetworkModuleTCP::m_uServerPort

Port for the server.

◆ m_uSocketServer

SocketType Burger::NetworkModuleTCP::m_uSocketServer

Host socket.

◆ m_uSocketWakeupServer

SocketType Burger::NetworkModuleTCP::m_uSocketWakeupServer

Special socket that can send messages to the server to cancel select() calls.

◆ m_WaitLock

Mutex Burger::NetworkModuleTCP::m_WaitLock

Event reply lock.

◆ m_WorkerThread

Thread Burger::NetworkModuleTCP::m_WorkerThread

Background thread.