47 struct lws_sspc_handle;
49 #if defined(LWS_SS_USE_SSPC)
50 #define lws_ss_handle lws_sspc_handle
51 #define lws_ss_create lws_sspc_create
52 #define lws_ss_destroy lws_sspc_destroy
53 #define lws_ss_request_tx lws_sspc_request_tx
54 #define lws_ss_request_tx_len lws_sspc_request_tx_len
55 #define lws_ss_client_connect lws_sspc_client_connect
56 #define lws_ss_get_sequencer lws_sspc_get_sequencer
57 #define lws_ss_proxy_create lws_sspc_proxy_create
58 #define lws_ss_get_context lws_sspc_get_context
59 #define lws_ss_rideshare lws_sspc_rideshare
60 #define lws_ss_set_metadata lws_sspc_set_metadata
61 #define lws_ss_get_metadata lws_sspc_get_metadata
62 #define lws_ss_add_peer_tx_credit lws_sspc_add_peer_tx_credit
63 #define lws_ss_get_est_peer_tx_credit lws_sspc_get_est_peer_tx_credit
64 #define lws_ss_start_timeout lws_sspc_start_timeout
65 #define lws_ss_cancel_timeout lws_sspc_cancel_timeout
66 #define lws_ss_to_user_object lws_sspc_to_user_object
67 #define lws_ss_change_handlers lws_sspc_change_handlers
68 #define lws_smd_ss_rx_forward lws_smd_sspc_rx_forward
69 #define lws_ss_server_ack lws_sspc_server_ack
70 #define lws_ss_tag lws_sspc_tag
71 #define _lws_fi_user_ss_fi _lws_fi_user_sspc_fi
72 #define lwsl_ss_get_cx lwsl_sspc_get_cx
75 #define lwsl_ss lwsl_sspc
77 #undef lwsl_hexdump_ss
78 #define lwsl_hexdump_ss lwsl_hexdump_sspc
87 #define lwsl_sspc(_h, _fil, ...) \
88 _lws_log_cx(lwsl_sspc_get_cx(_h), lws_log_prepend_sspc, _h, \
89 _fil, __func__, __VA_ARGS__)
91 #define lwsl_hexdump_sspc(_h, _fil, _buf, _len) \
92 lwsl_hexdump_level_cx(lwsl_sspc_get_cx(_h), \
93 lws_log_prepend_sspc, \
100 #if (_LWS_ENABLED_LOGS & LLL_ERR)
101 #define lwsl_sspc_err(_w, ...) lwsl_sspc(_w, LLL_ERR, __VA_ARGS__)
103 #define lwsl_sspc_err(_w, ...) do {} while(0)
106 #if (_LWS_ENABLED_LOGS & LLL_WARN)
107 #define lwsl_sspc_warn(_w, ...) lwsl_sspc(_w, LLL_WARN, __VA_ARGS__)
109 #define lwsl_sspc_warn(_w, ...) do {} while(0)
112 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
113 #define lwsl_sspc_notice(_w, ...) lwsl_sspc(_w, LLL_NOTICE, __VA_ARGS__)
115 #define lwsl_sspc_notice(_w, ...) do {} while(0)
118 #if (_LWS_ENABLED_LOGS & LLL_INFO)
119 #define lwsl_sspc_info(_w, ...) lwsl_sspc(_w, LLL_INFO, __VA_ARGS__)
121 #define lwsl_sspc_info(_w, ...) do {} while(0)
124 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
125 #define lwsl_sspc_debug(_w, ...) lwsl_sspc(_w, LLL_DEBUG, __VA_ARGS__)
127 #define lwsl_sspc_debug(_w, ...) do {} while(0)
130 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
131 #define lwsl_sspc_parser(_w, ...) lwsl_sspc(_w, LLL_PARSER, __VA_ARGS__)
133 #define lwsl_sspc_parser(_w, ...) do {} while(0)
136 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
137 #define lwsl_sspc_header(_w, ...) lwsl_sspc(_w, LLL_HEADER, __VA_ARGS__)
139 #define lwsl_sspc_header(_w, ...) do {} while(0)
142 #if (_LWS_ENABLED_LOGS & LLL_EXT)
143 #define lwsl_sspc_ext(_w, ...) lwsl_sspc(_w, LLL_EXT, __VA_ARGS__)
145 #define lwsl_sspc_ext(_w, ...) do {} while(0)
148 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
149 #define lwsl_sspc_client(_w, ...) lwsl_sspc(_w, LLL_CLIENT, __VA_ARGS__)
151 #define lwsl_sspc_client(_w, ...) do {} while(0)
154 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
155 #define lwsl_sspc_latency(_w, ...) lwsl_sspc(_w, LLL_LATENCY, __VA_ARGS__)
157 #define lwsl_sspc_latency(_w, ...) do {} while(0)
160 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
161 #define lwsl_sspc_thread(_w, ...) lwsl_sspc(_w, LLL_THREAD, __VA_ARGS__)
163 #define lwsl_sspc_thread(_w, ...) do {} while(0)
166 #if (_LWS_ENABLED_LOGS & LLL_USER)
167 #define lwsl_sspc_user(_w, ...) lwsl_sspc(_w, LLL_USER, __VA_ARGS__)
169 #define lwsl_sspc_user(_w, ...) do {} while(0)
172 #define lwsl_hexdump_sspc_err(_v, ...) lwsl_hexdump_sspc(_v, LLL_ERR, __VA_ARGS__)
173 #define lwsl_hexdump_sspc_warn(_v, ...) lwsl_hexdump_sspc(_v, LLL_WARN, __VA_ARGS__)
174 #define lwsl_hexdump_sspc_notice(_v, ...) lwsl_hexdump_sspc(_v, LLL_NOTICE, __VA_ARGS__)
175 #define lwsl_hexdump_sspc_info(_v, ...) lwsl_hexdump_sspc(_v, LLL_INFO, __VA_ARGS__)
176 #define lwsl_hexdump_sspc_debug(_v, ...) lwsl_hexdump_sspc(_v, LLL_DEBUG, __VA_ARGS__)
196 #if defined(STANDALONE)
197 #define lws_context lws_context_standalone
203 void *opaque_user_data,
struct lws_sspc_handle **ppss,
204 void *reserved,
const char **ppayload_fmt);
281 #if defined(LWS_WITH_NETWORK)
314 const void *value,
size_t len);
318 const void **value,
size_t *len);
358 #if defined(STANDALONE)
lws_ss_state_return_t(* lws_sscb_state)(void *userobj, void *h_src, lws_ss_constate_t state, lws_ss_tx_ordinal_t ack)
enum lws_ss_state_return lws_ss_state_return_t
lws_ss_state_return_t(* lws_sscb_tx)(void *userobj, lws_ss_tx_ordinal_t ord, uint8_t *buf, size_t *len, int *flags)
lws_ss_state_return_t(* lws_sscb_rx)(void *userobj, const uint8_t *buf, size_t len, int flags)
LWS_VISIBLE LWS_EXTERN struct lws_log_cx * lwsl_sspc_get_cx(struct lws_sspc_handle *ss)
LWS_VISIBLE LWS_EXTERN int lws_sspc_get_est_peer_tx_credit(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN void lws_sspc_change_handlers(struct lws_sspc_handle *h, lws_sscb_rx rx, lws_sscb_tx tx, lws_sscb_state state)
LWS_VISIBLE LWS_EXTERN void lws_sspc_server_ack(struct lws_sspc_handle *h, int nack)
LWS_VISIBLE LWS_EXTERN const char * lws_sspc_rideshare(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN int lws_sspc_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi, void *opaque_user_data, struct lws_sspc_handle **ppss, void *reserved, const char **ppayload_fmt)
LWS_VISIBLE LWS_EXTERN int lws_sspc_get_metadata(struct lws_sspc_handle *h, const char *name, const void **value, size_t *len)
LWS_VISIBLE LWS_EXTERN void lws_sspc_destroy(struct lws_sspc_handle **ppss)
LWS_VISIBLE LWS_EXTERN int lws_sspc_set_metadata(struct lws_sspc_handle *h, const char *name, const void *value, size_t len)
lws_dll2_owner_t ss_client_owner
lws_txp_path_client_t txp_cpath
LWS_VISIBLE LWS_EXTERN int lws_sspc_proxy_create(struct lws_context *context)
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t lws_sspc_request_tx_len(struct lws_sspc_handle *h, unsigned long len)
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t lws_sspc_client_connect(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN void * lws_sspc_to_user_object(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN void lws_sspc_cancel_timeout(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN const char * lws_sspc_tag(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN struct lws_context * lws_sspc_get_context(struct lws_sspc_handle *h)
LWS_VISIBLE LWS_EXTERN void lws_sspc_start_timeout(struct lws_sspc_handle *h, unsigned int timeout_ms)
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t lws_sspc_request_tx(struct lws_sspc_handle *pss)
LWS_VISIBLE LWS_EXTERN void lws_log_prepend_sspc(struct lws_log_cx *cx, void *obj, char **p, char *e)
LWS_VISIBLE LWS_EXTERN int lws_sspc_add_peer_tx_credit(struct lws_sspc_handle *h, int32_t add)