#include <TransportInterface.h>
Inheritance diagram for TransportInterface:
Public Member Functions | |
virtual bool | Start (unsigned short port, bool serverMode)=0 |
virtual void | Stop (void)=0 |
Stop the transport provider. You can clear memory and shutdown threads here. | |
virtual void | Send (PlayerID playerId, const char *data,...)=0 |
virtual void | CloseConnection (PlayerID playerId)=0 |
virtual Packet * | Receive (void)=0 |
virtual void | DeallocatePacket (Packet *packet)=0 |
virtual PlayerID | HasNewConnection (void)=0 |
virtual PlayerID | HasLostConnection (void)=0 |
virtual CommandParserInterface * | GetCommandParser (void)=0 |
|
Disconnect playerId . The binary address and port defines the PlayerID structure.
Implemented in RakNetTransport, and TelnetTransport. |
|
Deallocate the Packet structure returned by Receive
Implemented in RakNetTransport, and TelnetTransport. |
|
Your transport provider can itself have command parsers if the transport layer has user-modifiable features For example, your transport layer may have a password which you want remote users to be able to set or you may want to allow remote users to turn on or off command echo
Implemented in RakNetTransport, and TelnetTransport. |
|
If a system loses the connection, you should queue that event and return the playerId/address of that player in this function.
Implemented in RakNetTransport, and TelnetTransport. |
|
If a new system connects to you, you should queue that event and return the playerId/address of that player in this function.
Implemented in RakNetTransport, and TelnetTransport. |
|
Return a string. The string should be allocated and written to Packet::data . The byte length should be written to Packet::length . The player/address should be written to Packet::playerid If your transport protocol adds special formatting to the data stream you should parse it out before returning it in the packet and thus only return a string in Packet::data
Implemented in RakNetTransport, and TelnetTransport. |
|
Send a null-terminated string to playerId If your transport method requires particular formatting of the outgoing data (e.g. you don't just send strings) you can do it here and parse it out in Receive().
Implemented in RakNetTransport, and TelnetTransport. |
|
Start the transport provider on the indicated port.
Implemented in RakNetTransport, and TelnetTransport. |