Network Pipe Module Connection Peer. More...
#include <deBaseNetworkConnection.h>
Public Member Functions | |
Constructors and Destructors | |
| deBaseNetworkConnection () | |
| Creates a peer. | |
| virtual | ~deBaseNetworkConnection () |
| Cleans up the peer. | |
Management | |
| virtual bool | ConnectTo (const char *address) |
| Connects to the a connection object on the host at the given address. | |
| virtual void | Disconnect () |
| Disconnects from a remote connection if connected. | |
| virtual void | SendMessage (const char *message, int length, int maxDelay) |
| Sends a message to the remote connection if connected. | |
| virtual void | SendReliableMessage (const char *message, int length) |
| Sens a reliable message to the remote connection if connected. | |
| virtual void | LinkState (const char *message, int length, deNetworkState *state) |
| Links a network state to a remote network state. | |
Network Pipe Module Connection Peer.
Peer interface for connection objects.
| deBaseNetworkConnection::deBaseNetworkConnection | ( | ) |
Creates a peer.
| virtual deBaseNetworkConnection::~deBaseNetworkConnection | ( | ) | [virtual] |
Cleans up the peer.
| virtual bool deBaseNetworkConnection::ConnectTo | ( | const char * | address ) | [virtual] |
Connects to the a connection object on the host at the given address.
Returns true if the connection request has been send or false if an error occured. Connection success or failure is reported through the scripting peer. The format of the address is specific to the network module.
| virtual void deBaseNetworkConnection::Disconnect | ( | ) | [virtual] |
Disconnects from a remote connection if connected.
| virtual void deBaseNetworkConnection::LinkState | ( | const char * | message, |
| int | length, | ||
| deNetworkState * | state | ||
| ) | [virtual] |
Links a network state to a remote network state.
The message contains informations for the remote system to know what state to link to. The request is queued and carried out as soon as possible. The local state is considered the master state and the remote state the slave state. By default only the master state can apply changes.
| virtual void deBaseNetworkConnection::SendMessage | ( | const char * | message, |
| int | length, | ||
| int | maxDelay | ||
| ) | [virtual] |
Sends a message to the remote connection if connected.
The message can be queued and send at a later time to optimize throughput. The message will be not delayed longer than the given amount of milliseconds. The message is send unreliable and it is acceptable for the message to get lost due to transmission failure.
| virtual void deBaseNetworkConnection::SendReliableMessage | ( | const char * | message, |
| int | length | ||
| ) | [virtual] |
Sens a reliable message to the remote connection if connected.
The message is append to already waiting reliable messages and send as soon as possible. Reliable messages always arrive in the same order they have been queued.
1.7.2