Filter results by

Older Versions

Older API versions are available as a download. To view, extract the file and open the index.html file in a web browser.

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

Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

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]handleHandle value returned by websocket_request function
Returns
S_OK on success, error code otherwise
Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

Definition at line 181 of file artik_websocket.h.

artik_error(* artik_websocket_module::websocket_open_stream) (artik_websocket_handle handle)
Parameters
[in]handleHandle value obtained from websocket_request function
Returns
S_OK on success, error code otherwise
Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

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]handlePointer of a Handle variable
[in]configConfiguration structure of the websocket. It should be set before passed to this function.
Returns
S_OK on success, error code otherwise
Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

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]handleHandle value obtained from websocket_request function
[in]callbackartik_websocket_callback type function pointer of a callback to be called upon connection
[in]user_dataPointer of a data that you want to pass into callback
Returns
S_OK on success, error code otherwise
Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

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]handleHandle value obtained from websocket_request function
[in]callbackartik_websocket_callback type function pointer of a callback to be called upon data reception
[in]user_dataPointer of a data that you want to pass into callback
Returns
S_OK on success, error code otherwise
Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

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]handleHandle value obtained from websocket_request function
[in]messageString that you want to send
Returns
S_OK on success, error code otherwise
Examples:
websocket_test/artik_websocket_client_test.c, and websocket_test/artik_websocket_test.c.

Definition at line 134 of file artik_websocket.h.


The documentation for this struct was generated from the following file:
Last updated on: