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.{
cmd: "connected",
server: string,
socketid: string,
timeout: number,
ping_rate: number,
version: string,
protocol: number
}
Properties
server
: HAS server the app is connected to (ex: "has-server.domain.com")socketid
: WebSocket connection identifiertimeout
: 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 versionprotocol
: HAS protocol version in the formmajor.minor
An application should decline to connect to a HAS infrastructure whose major version is greater than the one it supports.
Last modified 1yr ago