![]() |
Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Callbacks used when listening for incoming connections as a server. More...
#include <Network.h>
Public Member Functions | |
virtual void | OnAccepted (cTCPLink &a_Link)=0 |
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)=0 |
Called when the socket fails to listen on the specified port. More... | |
virtual cTCPLink::cCallbacksPtr | OnIncomingConnection (const AString &a_RemoteIPAddress, UInt16 a_RemotePort)=0 |
Called when the TCP server created with Listen() receives a new incoming connection. More... | |
virtual | ~cListenCallbacks () |
Callbacks used when listening for incoming connections as a server.
|
inlinevirtual |
|
pure virtual |
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().
Implemented in cServerListenCallbacks, cRCONListenCallbacks, cHTTPServerListenCallbacks, and cLuaServerHandle.
|
pure virtual |
Called when the socket fails to listen on the specified port.
Implemented in cServerListenCallbacks, cRCONListenCallbacks, cHTTPServerListenCallbacks, and cLuaServerHandle.
|
pure virtual |
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.
Implemented in cServerListenCallbacks, cRCONListenCallbacks, cHTTPServerListenCallbacks, and cLuaServerHandle.