IChatService PingRoom Method Kentico 8.0 API Reference

Keeping alive user in a room. User has to call this method every few seconds to let server know that he is still online.

At the same time a new online users in a room and a new messages in a room are checked. Client sends the last time he made an update of online users (roomUsersLastChange) and messages (roomMessagesLastChange). If something new has happened since that time, the changes are sent back.

Namespace: CMS.Chat
Assembly: CMS.Chat (in CMS.Chat.dll) Version: 8.0.0.0 (8.0.5239.26125)

Parameters

roomID
Type: OnlineSystem Int32
ID of a chat room
roomUsersLastChange
Type: OnlineSystem Nullable OnlineInt64 
Last update of members on this client (client gets this number in PingRoom().Users.LastChange) - if this param is null, client does not need online users. If it is 0, it is the first request and all users are returned.
roomMessagesLastChange
Type: OnlineSystem Nullable OnlineInt64 
Last update of messages on this client (client gets this number in PingRoom().Messages.LastChange) - if this param is null, client does not need online users. If it is 0, it is the first request and all users are returned.
maxMessagesCount
Type: OnlineSystem Nullable OnlineInt32 
Maximum number of messages returned

Return Value

Type: ChatGeneralResponse PingRoomResponseData 
PingRoomsResultData
See Also