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


TMsgClient.SendCommand
TMsgClient
Top 

Sends a custom command.

function SendCommand(Command: Cardinal; Buffer:PChar; Size: Integer): Integer;

Description

Call SendCommand to send a custom command to the server which client is connected to.
Command is an identifier of your command.
Buffer is a pointer to a binary data you can send with your command (can be equal to nil if it is not needed).
Size is a length of the Buffer in bytes (can be equal to 0).

To receive messages on a server side, set event handler TMsgServer.OnReceiveCommand.

If SendCommand finished successfully it will return MSG_COMMAND_OK.
SendCommand can return one of the following error codes:
Name
Value
MSG_Error_SendCommand_NotConnected
MSG_Error_SendCommand_SendFailed
MSG_Error_SendCommand_SaveHistoryToDatabaseFailed
MSG_Error_SendCommand_NotLogged
60084
60085
60086
60122



© AidAim Software MsgCommunicator: Delphi Messenger Sdk Instant Messaging Sdk Im Sd