HTTP Server Data Stream
HTTP server APIs to transfer data between a client and device application h1. Features. More...
Modules |
|
Types | |
HTTP server stream data types.
|
|
General API | |
HTTP server stream general API for both REST and Websocket clients.
|
|
Websocket API | |
HTTP server stream general API for Websocket clients.
|
|
Detailed Description
HTTP server APIs to transfer data between a client and device application h1. Features.
- Simple API a Gecko OS application may use to read/write data to a webpage/cloud
- HTTP protocol a webpage/cloud may use to read/write data to a Gecko OS application
- REST API protocol
- Websocket protocol
h1. Overview For both the REST and Websocket protocols, the basic operation is as follows:
App registers 'stream' listener
Webpage issues request to list app's registered listeners (this step is optional)
Webpage issues operation to app's stream
App receives listener callback and based on the operation either reads or writes the stream
h1. REST Protocol The REST protocol allows for a webpage to invoke a read or write operation with the device. When the device receives the operation, a callback will be invoked in the device Application.
h1. Websocket Protocol The websocket protocol allows a webpage to invoke a read/write operation on the device as well as the device to invoke a read/write operation on the webpage.