libwebsockets
Lightweight C library for HTML5 websockets
lws-secure-streams.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lws_ss_info
 

Macros

#define LWS_SS_MTU   1540
 
#define LWS_SS_USER_TYPEDEF
 
#define LWS_SS_INFO(_streamtype, _type)
 
#define lws_ss_from_user(_u)   (_u)->ss
 
#define lws_ss_opaque_from_user(_u)   (_u)->opaque_data
 
#define lws_ss_cx_from_user(_u)   lws_ss_get_context((_u)->ss)
 
#define lws_context_info_defaults(_x, _y)   _lws_context_info_defaults(_x, _y)
 
#define LWSSS_TIMEOUT_FROM_POLICY   0
 

Typedefs

typedef uint32_t lws_ss_tx_ordinal_t
 
typedef enum lws_ss_state_return lws_ss_state_return_t
 
typedef lws_ss_state_return_t(* lws_sscb_rx) (void *userobj, const uint8_t *buf, size_t len, int flags)
 
typedef lws_ss_state_return_t(* lws_sscb_tx) (void *userobj, lws_ss_tx_ordinal_t ord, uint8_t *buf, size_t *len, int *flags)
 
typedef lws_ss_state_return_t(* lws_sscb_state) (void *userobj, void *h_src, lws_ss_constate_t state, lws_ss_tx_ordinal_t ack)
 
typedef struct lws_ss_info lws_ss_info_t
 
typedef void(* lws_sssfec_cb) (struct lws_ss_handle *h, void *arg)
 

Enumerations

enum  lws_ss_constate_t {
  LWSSSCS_CREATING = 1 , LWSSSCS_DISCONNECTED , LWSSSCS_UNREACHABLE , LWSSSCS_AUTH_FAILED ,
  LWSSSCS_CONNECTED , LWSSSCS_CONNECTING , LWSSSCS_DESTROYING , LWSSSCS_POLL ,
  LWSSSCS_ALL_RETRIES_FAILED , LWSSSCS_QOS_ACK_REMOTE , LWSSSCS_QOS_NACK_REMOTE , LWSSSCS_QOS_ACK_LOCAL ,
  LWSSSCS_QOS_NACK_LOCAL , LWSSSCS_TIMEOUT , LWSSSCS_SERVER_TXN , LWSSSCS_SERVER_UPGRADE ,
  LWSSSCS_EVENT_WAIT_CANCELLED , LWSSSCS_UPSTREAM_LINK_RETRY , LWSSSCS_SINK_JOIN , LWSSSCS_SINK_PART ,
  LWSSSCS_USER_BASE = 1000
}
 
enum  {
  LWSSS_FLAG_SOM = (1 << 0) , LWSSS_FLAG_EOM = (1 << 1) , LWSSS_FLAG_POLL = (1 << 2) , LWSSS_FLAG_RELATED_START = (1 << 3) ,
  LWSSS_FLAG_RELATED_END = (1 << 4) , LWSSS_FLAG_RIDESHARE = (1 << 5) , LWSSS_FLAG_PERF_JSON = (1 << 6)
}
 
enum  lws_ss_state_return { LWSSSSRET_TX_DONT_SEND = 1 , LWSSSSRET_OK = 0 , LWSSSSRET_DISCONNECT_ME = -1 , LWSSSSRET_DESTROY_ME = -2 }
 
enum  {
  LWSSSINFLAGS_REGISTER_SINK = (1 << 0) , LWSSSINFLAGS_PROXIED = (1 << 1) , LWSSSINFLAGS_SERVER = (1 << 2) , LWSSSINFLAGS_ACCEPTED = (1 << 3) ,
  LWSSSINFLAGS_ACCEPTED_SINK = (1 << 4)
}
 

Functions

LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ss_create (struct lws_context *context, int tsi, const lws_ss_info_t *ssi, void *opaque_user_data, struct lws_ss_handle **ppss, void *reserved, const char **ppayload_fmt)
 
LWS_VISIBLE LWS_EXTERN void lws_ss_destroy (struct lws_ss_handle **ppss)
 
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t LWS_WARN_UNUSED_RESULT lws_ss_request_tx (struct lws_ss_handle *pss)
 
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t LWS_WARN_UNUSED_RESULT lws_ss_request_tx_len (struct lws_ss_handle *pss, unsigned long len)
 
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t LWS_WARN_UNUSED_RESULT lws_ss_client_connect (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN int lws_ss_proxy_create (struct lws_context *context, const char *bind, int port)
 
LWS_VISIBLE LWS_EXTERN const char * lws_ss_state_name (int state)
 
LWS_VISIBLE LWS_EXTERN struct lws_context * lws_ss_get_context (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN struct lws_vhost * lws_ss_get_vhost (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN void lws_ss_start_timeout (struct lws_ss_handle *h, unsigned int timeout_ms)
 
LWS_VISIBLE LWS_EXTERN void lws_ss_cancel_timeout (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN void * lws_ss_to_user_object (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN const char * lws_ss_rideshare (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ss_set_metadata (struct lws_ss_handle *h, const char *name, const void *value, size_t len)
 
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ss_alloc_set_metadata (struct lws_ss_handle *h, const char *name, const void *value, size_t len)
 
LWS_VISIBLE LWS_EXTERN int lws_ss_get_metadata (struct lws_ss_handle *h, const char *name, const void **value, size_t *len)
 
LWS_VISIBLE LWS_EXTERN void lws_ss_server_ack (struct lws_ss_handle *h, int nack)
 
LWS_VISIBLE LWS_EXTERN void lws_ss_server_foreach_client (struct lws_ss_handle *h, lws_sssfec_cb cb, void *arg)
 
LWS_VISIBLE LWS_EXTERN void lws_ss_change_handlers (struct lws_ss_handle *h, lws_sscb_rx rx, lws_sscb_tx tx, lws_sscb_state state)
 
LWS_VISIBLE LWS_EXTERN int lws_ss_add_peer_tx_credit (struct lws_ss_handle *h, int32_t add)
 
LWS_VISIBLE LWS_EXTERN int lws_ss_get_est_peer_tx_credit (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN const char * lws_ss_tag (struct lws_ss_handle *h)
 
LWS_VISIBLE LWS_EXTERN int lws_ss_adopt_raw (struct lws_ss_handle *ss, lws_sock_file_fd_type fd)