Click or drag to resize
ChatServicePingRoom Method

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: 12.0.0
Syntax
C#
public ChatGeneralResponse<PingRoomResponseData> PingRoom(
	int roomID,
	Nullable<long> roomUsersLastChange,
	Nullable<long> roomMessagesLastChange,
	Nullable<int> maxMessagesCount
)

Parameters

roomID
Type: SystemInt32
ID of a chat room
roomUsersLastChange
Type: SystemNullableInt64
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: SystemNullableInt64
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: SystemNullableInt32
Maximum number of messages returned

Return Value

Type: ChatGeneralResponsePingRoomResponseData
PingRoomsResultData

Implements

IChatServicePingRoom(Int32, NullableInt64, NullableInt64, NullableInt32)
See Also