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
    handleHandle for stream
    streamStream string (i.e. name of the stream)
    methodOperation to perform on stream
    argSupplied 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
handleThe handle of the disconnecting websocket stream

Enumeration Type Documentation

Method required by stream callback.

Enumerator
HS_STREAM_UNKNOWN 

Unknown.

HS_STREAM_WRITE 

Write to HTTP server stream.

HS_STREAM_READ 

Read from HTTP server stream.

HS_STREAM_LISTEN 

Register listener for HTTP server stream.

HS_STREAM_UNLISTEN 

Unregister listener for HTTP server stream.