Interface for a Communicator More...
Public Member Functions | |
bool | Poll () |
Check if there are data package to be retrieved More... | |
void | PushPackage (int senderActor, int eventCode, object data) |
Push a new Package into the communicator queues More... | |
int | ReceivePackage (out int senderActor, byte *buffer, int bufferLength) |
Retrieve a Data Package More... | |
void | RegisterPackageCallback< T > (Action< int, T > callback) |
Register a callback for a specific Message Type More... | |
void | SendMessage (int targetActor, IMessage message) |
Send a Protocol Message using the communicator system More... | |
bool | SendPackage (byte code, int targetActor, bool reliable, byte *buffer, int bufferLength) |
Sends a package data using the communication system More... | |
void | Service () |
Step the Communicator internals More... | |
Properties | |
int | CommunicatorID [get] |
Represents the current ID of the communicator. More... | |
Interface for a Communicator
bool Poll | ( | ) |
Check if there are data package to be retrieved
void PushPackage | ( | int | senderActor, |
int | eventCode, | ||
object | data | ||
) |
Push a new Package into the communicator queues
senderActor | Data Sender Actor |
eventCode | Event Code of the Package |
data | Package |
int ReceivePackage | ( | out int | senderActor, |
byte * | buffer, | ||
int | bufferLength | ||
) |
Retrieve a Data Package
senderActor | Data Package Sender |
buffer | Buffer to be filled with the Data |
bufferLength | Buffer length |
void RegisterPackageCallback< T > | ( | Action< int, T > | callback | ) |
Register a callback for a specific Message Type
T | Message Type |
callback | Callback to be invoked when a Message of type T is received |
T | : | IMessage |
void SendMessage | ( | int | targetActor, |
IMessage | message | ||
) |
bool SendPackage | ( | byte | code, |
int | targetActor, | ||
bool | reliable, | ||
byte * | buffer, | ||
int | bufferLength | ||
) |
Sends a package data using the communication system
code | Event Code used to send the Package |
targetActor | Target Actor of the Package |
reliable | Flag if this Package should be sent reliably |
buffer | Data Buffer |
bufferLength | Buffer Length |
void Service | ( | ) |
Step the Communicator internals
|
get |
Represents the current ID of the communicator.