Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Public Member Functions | |
cServerListenCallbacks (cServer &a_Server, UInt16 a_Port) | |
Public Member Functions inherited from cNetwork::cListenCallbacks | |
virtual | ~cListenCallbacks () |
Private Member Functions | |
virtual void | OnAccepted (cTCPLink &a_Link) override |
Called when the TCP server created with Listen() creates a new link for an incoming connection. More... | |
virtual void | OnError (int a_ErrorCode, const AString &a_ErrorMsg) override |
Called when the socket fails to listen on the specified port. More... | |
virtual cTCPLink::cCallbacksPtr | OnIncomingConnection (const AString &a_RemoteIPAddress, UInt16 a_RemotePort) override |
Called when the TCP server created with Listen() receives a new incoming connection. More... | |
Private Attributes | |
UInt16 | m_Port |
cServer & | m_Server |
Definition at line 34 of file Server.cpp.
Definition at line 53 of file Server.cpp.
|
inlineoverrideprivatevirtual |
Called when the TCP server created with Listen() creates a new link for an incoming connection.
Provides the newly created Link that can be used for communication. Called right after a successful OnIncomingConnection().
Implements cNetwork::cListenCallbacks.
Definition at line 45 of file Server.cpp.
|
inlineoverrideprivatevirtual |
Called when the socket fails to listen on the specified port.
Implements cNetwork::cListenCallbacks.
Definition at line 47 of file Server.cpp.
|
inlineoverrideprivatevirtual |
Called when the TCP server created with Listen() receives a new incoming connection.
Returns the link callbacks that the server should use for the newly created link. If a nullptr is returned, the connection is dropped immediately; otherwise a new cTCPLink instance is created and OnAccepted() is called.
Implements cNetwork::cListenCallbacks.
Definition at line 40 of file Server.cpp.
|
private |
Definition at line 38 of file Server.cpp.
|
private |
Definition at line 37 of file Server.cpp.