artik_websocket_module Struct Reference
Websocket module operations. More...
#include <connectivity/artik_websocket.h>
Data Fields | |
| artik_error(* | websocket_request )(artik_websocket_handle *handle, artik_websocket_config *config) |
| Request a handle to make a websocket stream. More... | |
| artik_error(* | websocket_open_stream )(artik_websocket_handle handle) |
| Open websocket stream. More... | |
| artik_error(* | websocket_write_stream )(artik_websocket_handle handle, char *message) |
| Send a string through stream. More... | |
| artik_error(* | websocket_set_connection_callback )(artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
| Set a callback function handling changes in connection state. More... | |
| artik_error(* | websocket_set_receive_callback )(artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
| Set a callback function handling data received. More... | |
| artik_error(* | websocket_close_stream )(artik_websocket_handle handle) |
| Close websocket stream. More... | |
Detailed Description
Structure containing all the operations exposed by the module to perform Websocket features
Definition at line 98 of file artik_websocket.h.
Field Documentation
| artik_error(* artik_websocket_module::websocket_close_stream) (artik_websocket_handle handle) |
- Parameters
-
[in] handle Handle value returned by websocket_request function
- Returns
- S_OK on success, error code otherwise
Definition at line 181 of file artik_websocket.h.
| artik_error(* artik_websocket_module::websocket_open_stream) (artik_websocket_handle handle) |
- Parameters
-
[in] handle Handle value obtained from websocket_request function
- Returns
- S_OK on success, error code otherwise
Definition at line 121 of file artik_websocket.h.
| artik_error(* artik_websocket_module::websocket_request) (artik_websocket_handle *handle, artik_websocket_config *config) |
- Parameters
-
[in] handle Pointer of a Handle variable [in] config Configuration structure of the websocket. It should be set before passed to this function.
- Returns
- S_OK on success, error code otherwise
Definition at line 109 of file artik_websocket.h.
| artik_error(* artik_websocket_module::websocket_set_connection_callback) (artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
- Parameters
-
[in] handle Handle value obtained from websocket_request function [in] callback artik_websocket_callback type function pointer of a callback to be called upon connection [in] user_data Pointer of a data that you want to pass into callback
- Returns
- S_OK on success, error code otherwise
Definition at line 152 of file artik_websocket.h.
| artik_error(* artik_websocket_module::websocket_set_receive_callback) (artik_websocket_handle handle, artik_websocket_callback callback, void *user_data) |
- Parameters
-
[in] handle Handle value obtained from websocket_request function [in] callback artik_websocket_callback type function pointer of a callback to be called upon data reception [in] user_data Pointer of a data that you want to pass into callback
- Returns
- S_OK on success, error code otherwise
Definition at line 171 of file artik_websocket.h.
| artik_error(* artik_websocket_module::websocket_write_stream) (artik_websocket_handle handle, char *message) |
- Parameters
-
[in] handle Handle value obtained from websocket_request function [in] message String that you want to send
- Returns
- S_OK on success, error code otherwise
Definition at line 134 of file artik_websocket.h.
The documentation for this struct was generated from the following file:
- inc/connectivity/artik_websocket.h
Last updated on: