Photon .NET Client API
Public Member Functions | List of all members
ExitGames.Client.Photon.Chat.IChatClientListener Interface Reference

Callback interface for Chat client side. Contains callback methods to notify your app about updates. Must be provided to new ChatClient in constructor More...

Public Member Functions

void DebugReturn (DebugLevel level, string message)
 All debug output of the library will be reported through this method. Print it or put it in a buffer to use it on-screen.
Parameters
levelDebugLevel (severity) of the message.
messageDebug text. Print to System.Console or screen.
More...
 
void OnDisconnected ()
 Disconnection happened. More...
 
void OnConnected ()
 Client is connected now. More...
 
void OnChatStateChange (ChatState state)
 The ChatClient's state changed. Usually, OnConnected and OnDisconnected are the callbacks to react to. More...
 
void OnGetMessages (string channelName, string[] senders, object[] messages)
 Notifies app that client got new messages from server Number of senders is equal to number of messages in 'messages'. Sender with number '0' corresponds to message with number '0', sender with number '1' corresponds to message with number '1' and so on More...
 
void OnPrivateMessage (string sender, object message, string channelName)
 Notifies client about private message More...
 
void OnSubscribed (string[] channels, bool[] results)
 Result of Subscribe operation. Returns per channelname if the channel is now subscribed. More...
 
void OnUnsubscribed (string[] channels)
 Result of Unsubscribe operation. Returns per channelname if the channel is now unsubscribed. More...
 
void OnStatusUpdate (string user, int status, bool gotMessage, object message)
 New status of another user (you get updates for users set in your friends list). More...
 

Detailed Description

Callback interface for Chat client side. Contains callback methods to notify your app about updates. Must be provided to new ChatClient in constructor

Member Function Documentation

void ExitGames.Client.Photon.Chat.IChatClientListener.DebugReturn ( DebugLevel  level,
string  message 
)

All debug output of the library will be reported through this method. Print it or put it in a buffer to use it on-screen.

Parameters
levelDebugLevel (severity) of the message.
messageDebug text. Print to System.Console or screen.

void ExitGames.Client.Photon.Chat.IChatClientListener.OnChatStateChange ( ChatState  state)

The ChatClient's state changed. Usually, OnConnected and OnDisconnected are the callbacks to react to.

Parameters
stateThe new state.
void ExitGames.Client.Photon.Chat.IChatClientListener.OnConnected ( )

Client is connected now.

Clients have to be connected before they can send their state, subscribe to channels and send any messages.

void ExitGames.Client.Photon.Chat.IChatClientListener.OnDisconnected ( )

Disconnection happened.

void ExitGames.Client.Photon.Chat.IChatClientListener.OnGetMessages ( string  channelName,
string[]  senders,
object[]  messages 
)

Notifies app that client got new messages from server Number of senders is equal to number of messages in 'messages'. Sender with number '0' corresponds to message with number '0', sender with number '1' corresponds to message with number '1' and so on

Parameters
channelNamechannel from where messages came
senderslist of users who sent messages
messageslist of messages it self
void ExitGames.Client.Photon.Chat.IChatClientListener.OnPrivateMessage ( string  sender,
object  message,
string  channelName 
)

Notifies client about private message

Parameters
senderuser who sent this message
messagemessage it self
channelNamechannelName for private messages (messages you sent yourself get added to a channel per target username)
void ExitGames.Client.Photon.Chat.IChatClientListener.OnStatusUpdate ( string  user,
int  status,
bool  gotMessage,
object  message 
)

New status of another user (you get updates for users set in your friends list).

Parameters
userName of the user.
statusNew status of that user.
gotMessageTrue if the status contains a message you should cache locally. False: This status update does not include a message (keep any you have).
messageMessage that user set.
void ExitGames.Client.Photon.Chat.IChatClientListener.OnSubscribed ( string[]  channels,
bool[]  results 
)

Result of Subscribe operation. Returns per channelname if the channel is now subscribed.

Parameters
channelsArray of channel names.
resultsPer channel result if subscribed.
void ExitGames.Client.Photon.Chat.IChatClientListener.OnUnsubscribed ( string[]  channels)

Result of Unsubscribe operation. Returns per channelname if the channel is now unsubscribed.

Parameters
channelsArray of channel names that are no longer subscribed.

The documentation for this interface was generated from the following file: