HiveAuth
Search…
Connection
The first thing an APP needs to do is to open a WebSocket connection with a HAS server. Once connected, the HAS will send a connected message with additional information.
1
{
2
cmd: "connected",
3
server: string,
4
socketid: string,
5
timeout: number,
6
ping_rate: number,
7
version: string,
8
protocol: number
9
}
Copied!
Properties
  • server: HAS server the app is connected to (ex: "has-server.domain.com")
  • socketid: WebSocket connection identifier
  • timeout: time in seconds before the server considers requests to be expired. Default is 60 seconds.
  • ping_rate: rate in seconds at which the server will check the connection with its clients. Default is 30 seconds.
  • version: HAS code version
  • protocol: HAS protocol version in the form major.minor
An application should decline to connect to a HAS infrastructure whose major version is greater than the one it supports.
Copy link