![]() |
Diarkis C# Client SDK
|
Directly sends and receives messages from another user by passing thier user ID only. More...
Public Member Functions | |
delegate void | MessageHandler (string senderUID, byte[] message) |
Raised when a message is received. More... | |
delegate void | ResponseHandler (bool success, byte[] message) |
bool | SetupAsUdp (Udp udp) |
DirectMessage class does not have network transport. Set up DirectMessage class instance with Diarkis Udp class instance. More... | |
bool | SetupAsTcp (Tcp tcp) |
DirectMessage class does not have network transport. Set up DirectMessage class instance with Diarkis Tcp class instance. More... | |
virtual void | Send (string uid, byte[] message) |
Sends a direct message to the remote user. The first message must "find" the remote client and it may take some time (possibly seconds). If DirectMessage is set up with Diarkis Udp class, the message will be sent as a plain UDP message. More... | |
virtual void | RSend (string uid, byte[] message) |
Sends a direct message to the remote user. The first message must "find" the remote client and it may take some time (possibly seconds). If DirectMessage is set up with Diarkis Udp class, the message will be sent as an RUDP message. More... | |
virtual void | Disconnect (string uid, byte[] message) |
Disconnects the direct message channel with the remote client and sends a custom disconnect message. If Diarkis Udp class is used, the disconnect message is sent as an RUDP message. More... | |
Protected Member Functions | |
void | DispatchEvent_ (byte[] payload, MessageHandler callback) |
Static Protected Attributes | |
const uint | STATUS_OK = 1 |
const uint | VER = 1 |
const uint | DISCONN_CMD = 700 |
const uint | SEND_CMD = 701 |
const uint | CONN_CMD = 702 |
Events | |
virtual MessageHandler | OnMessage |
virtual MessageHandler | OnDisconnect |
virtual MessageHandler | OnConnect |
virtual ResponseHandler | OnMessageResponse |
virtual ResponseHandler | OnDisconnectResponse |
Directly sends and receives messages from another user by passing thier user ID only.
|
inlinevirtual |
Disconnects the direct message channel with the remote client and sends a custom disconnect message. If Diarkis Udp class is used, the disconnect message is sent as an RUDP message.
uid | User ID of the remote client to disconnect from. |
message | Disconnect message to be delivered to the remote client. |
Reimplemented in Diarkis.Modules.WsDirectMessage.
delegate void Diarkis.Modules.DirectMessage.MessageHandler | ( | string | senderUID, |
byte[] | message | ||
) |
Raised when a message is received.
senderUID | User ID of the message sender. |
message | Message byte array. |
|
inlinevirtual |
Sends a direct message to the remote user. The first message must "find" the remote client and it may take some time (possibly seconds). If DirectMessage is set up with Diarkis Udp class, the message will be sent as an RUDP message.
uid | User ID of the remote client to deliver the direct message to. |
message | Message byte array to be delivered. |
|
inlinevirtual |
Sends a direct message to the remote user. The first message must "find" the remote client and it may take some time (possibly seconds). If DirectMessage is set up with Diarkis Udp class, the message will be sent as a plain UDP message.
uid | User ID of the remote client to deliver the direct message to. |
message | Message byte array to be delivered. |
Reimplemented in Diarkis.Modules.WsDirectMessage.
|
inline |
DirectMessage class does not have network transport. Set up DirectMessage class instance with Diarkis Tcp class instance.
tcp | Diarkis Udp class instance to be used as internal network transport for DirectMessage. |
|
inline |
DirectMessage class does not have network transport. Set up DirectMessage class instance with Diarkis Udp class instance.
udp | Diarkis Udp class instance to be used as internal network transport for DirectMessage. |