The first thing that a HTTaP client does, upon first connection to a server, is to check its configuration and characteristics. They are provided by a JSON object with these properties:
- HTTaP_version : returns an integer that describes the date in YYYYMMDD format (when displayed in decimal). Reading this property indicates that the server is HTTaP-compatible so this property is required.
- HTTaP_open : this flag is cleared (0) during the first access, and set (1) for the next accesses. This is used to determine if another connection is established with another page on another tab in the same browser.
- Type : returns a string that describes the server (optional).
- Keepalive : how many second a connexion stays open. This way you can compute your own timing before you send a ping request. => this is moved to the ping packet.
- ID : return a string that descibes the name or serial number of the server. Put your name here ;-)
- Services : lists the available features that the server implements. For now it's a string but will become an object for a better (and hierarchical) description. Possible services : Loopback, Files, ...
- Signals : lists the available signals that can be queried. Each can be a complex object.
- SessionID : integer number, generated randomly at each new connection. Used as a token for the persistent connection. For example, helps the client detect that the connection was interrupted. => This is moved to the HTTP header
More will appear as the protocol grows...
As of 20200511 the current implementation returns this root object :
{
"HTTaP_open": 1,
"HTTaP_version":"20200511",
"ID":"blocking server with HTTaP",
"Services":"Files "
}
More will probably follow.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.