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
  • server: HAS server the app is connected to (ex: "")
  • 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.