Web Sockets status - a few questions

Found in the C code for web sockets there is a status property. There is also a Prolog predicate ws_propetry/2 which does not support the status property.

Here is the C code

which can be used in Prolog as

websocket:ws_property(WebSocket,status,Status)

I was considering using this to check if a connection was closed before sending close or ping but thought there might be a reason it is private at the Prolog level, so asking.


Also in reading the Web Socket rfc6455 it notes 4 states

  • CONNECTING state
  • OPEN state
  • CLOSING state
  • CLOSED state

yet the status values listed in the SWI-Prolog C code are

Is there a simple corelation between the two?

This is my first time coding Web Sockets so this partly out of curosity.