Send a private message to a user.
The message is broadcasted to the recipient and the sender.
The message is broadcasted to the recipient and the sender.


- message (String)
- the text of the public message.
- recipientId (Int32)
- the id of the recipient user.
- roomId (Int32)
- the id of the room from where the message is sent, in case of multi-room join (optional, default value: activeRoomId).

Sends:
SFSEvent..::.OnPrivateMessageDelegate
Version:
SmartFoxServer Basic / Pro

The following example shows how to send and receive a private message.
CopyC#

SFSEvent.onPrivateMessage += OnPrivateMessage; smartFox.SendPrivateMessage("Hallo Jack!", 22); public void OnPrivateMessage(string message, User sender, int roomId, int userId) { Debug.WriteLine("User " + sender.getName() + " sent the following private message: " + message); }