Packets

Get online users count

Returns current online users count for the application.

Get online users count returns the current online users metric for the application. This operation is available only after successful Initialize.

Request

Get online users count uses packet type = 10.

{
  "type": 10,
  "id": 11
}

Prop

Type

Response

{
  "id": 11,
  "online_users_count": 100,
  "status": 1
}

Prop

Type

Behavior notes

  • Request and response are regular text JSON websocket frames.
  • This operation does not require an authorized user/license session; initialized session is enough.
  • If application currently has no connected sessions, server returns online_users_count = 0 with Ok.
  • On non-OK statuses, online_users_count is omitted.

Get-online-users-count statuses

StatusConstantReturned when
1OkCount returned successfully.
6InternalServerErrorServer failed to read connected sessions count due to an internal error.

Connection-close cases (before/around this usecase)

Get online users count itself returns regular JSON responses, but session can still be closed by protocol/session guards:

Close codeErrorWhen it happens
4200connection is not initializedRequest was sent before successful Initialize.
4201rate limit hitGlobal per-session packet rate limit was exceeded.
4302invalid request bodyPacket body does not match the required schema for this operation.
4304received unsupported dataClient sent unsupported frame type (request packets must be text JSON).

On this page