MsgCommunicator: Delphi Instant Messaging (IM) SDK
for easy creation of custom messenger system


TMsgClient.SendMessage
TMsgClient
Top 

Sends a custom message to client.

procedure SendMessage(ToUserID: Cardinal; const Text: String; Directly: Boolean = True); overload;
procedure
SendMessage(ToUserID: Cardinal; Buffer: PChar; Size: Integer; Directly: Boolean = True); overload;
procedure
SendMessage(ToUserID: Cardinal; Stream: TStream; Directly: Boolean = True); overload;

Description

Call SendMessage to send a custom message to the client connected to this server.
ToUserID is an unique ID of the recipient in the users database at the server which this client is connected to.
Text is a text of the message.
Buffer is a binary buffer (can be nil).
Size is a size of the binary buffer (can be >= 0).
Stream is a stream with message data.
Set Directly to False to force the client to send message through the server only. Otherwise, it will try to send message to other client directly.

To receive messages, set one of the following event handlers:
OnReceiveTextMessage
OnReceiveBinaryMessage
OnReceiveStreamMessage



© AidAim Software MsgCommunicator: