Types
HTTP server stream data types. More...
Typedefs | |
typedef void * | zos_hs_handle_t |
Generic handle for a stream. | |
typedef zos_result_t(* | zos_hs_stream_callback_t) (zos_hs_handle_t handle, const char *stream, zos_hs_stream_method_t method, void *arg) |
Callback prototype for HTTP server stream. More... | |
typedef zos_bool_t(* | zos_hs_ws_connect_callback_t) (void) |
Callback for a websocket stream connects. More... | |
typedef void(* | zos_hs_ws_disconnect_callback_t) (zos_hs_handle_t handle) |
Callback for a websocket stream disconnect event. More... | |
Enumerations | |
enum | zos_hs_stream_method_t { HS_STREAM_UNKNOWN, HS_STREAM_WRITE, HS_STREAM_READ, HS_STREAM_LISTEN, HS_STREAM_UNLISTEN } |
Method required by stream callback. More... | |
Detailed Description
HTTP server stream data types.
Typedef Documentation
typedef zos_result_t(* zos_hs_stream_callback_t) (zos_hs_handle_t handle, const char *stream, zos_hs_stream_method_t method, void *arg) |
Callback prototype for HTTP server stream.
- Note
- If using the REST implementation, callback is in HTTP server thread context, if using the websocket implementation, callback is in Zap thread context
- Parameters
-
handle
Handle for stream stream
Stream string (i.e. name of the stream) method
Operation to perform on stream arg
Supplied argument when registering stream callback
- Returns
- zos_result_t result of api call
typedef zos_bool_t(* zos_hs_ws_connect_callback_t) (void) |
Callback for a websocket stream connects.
- Note
- Executes in HTTP server thread context
- Returns
- ZOS_TRUE if the websocket stream SHOULD connect, ZOS_FALSE to stop the websocket stream from connecting
typedef void(* zos_hs_ws_disconnect_callback_t) (zos_hs_handle_t handle) |
Callback for a websocket stream disconnect event.
- Note
- Executes in ZAP thread context
- Parameters
-
handle
The handle of the disconnecting websocket stream