ModeratorMessageRequest Class |
Namespace: Sfs2X.Requests
public class ModeratorMessageRequest : GenericMessageRequest
Name | Description | |
---|---|---|
ModeratorMessageRequest(String, MessageRecipientMode) |
See ModeratorMessageRequest(string, MessageRecipientMode, ISFSObject) constructor.
| |
ModeratorMessageRequest(String, MessageRecipientMode, ISFSObject) |
Creates a new ModeratorMessageRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.MODERATOR_MESSAGE, OnModeratorMessage); // Set the message recipients: all users in the current Room MessageRecipientMode recipMode = new MessageRecipientMode(MessageRecipientMode.TO_ROOM, sfs.LastJoinedRoom); // Send the moderator message sfs.Send( new ModeratorMessageRequest("Hello everybody, I'm the Moderator!", recipMode) ); } void OnModeratorMessage(BaseEvent evt) { Console.WriteLine("The moderator sent the following message: " + (string)evt.Params["message"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("The moderator sent the following message: " + (string)evt.Params["message"]); // UWP }