Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.6 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.6 KB

Realtime API

Point your client to the Websocket of the server you want to connect to:

wss://[ABC.DOMAIN.COM]/websocket

Our real-time API is composed of two elements: Method Calls and Subscriptions. Both of them are supported directly in the websocket connection.

To make it possible to have everything working on the same connection we use RPC with the following format.

{
    "msg": "type-of-communication",
    "id": "unique-id",
    ... // per call defined data
}

The type of communication is defined according to the call:

  • Method Calls: method

  • Subscriptions: sub

    Please note, the server will send you "ping" and you must respond with "pong" otherwise the server will close the connection.

Before requesting any method / subscription you have to send a connect message:

{
    "msg": "connect",
    "version": "1",
    "support": ["1"]
}

Resources