libwebsockets
Lightweight C library for HTML5 websockets
lws_transport_proxy_ops Struct Reference

#include <lws-secure-streams-serialization.h>

+ Collaboration diagram for lws_transport_proxy_ops:

Data Fields

const char * name
 
int(* init_proxy_server )(struct lws_context *context, const struct lws_transport_proxy_ops *txp_ops_inward, lws_transport_priv_t txp_priv_inward, lws_txp_path_proxy_t *txp_ppath, const void *aux, const char *bind, int port)
 
int(* destroy_proxy_server )(struct lws_context *context)
 
lws_ss_state_return_t(* event_new_conn )(struct lws_context *cx, const struct lws_transport_proxy_ops *txp_ops_inward, lws_transport_priv_t txp_priv_inward, struct lws_sss_proxy_conn **conn, lws_transport_priv_t txp_priv)
 
void(* event_onward_bind )(lws_transport_priv_t priv, struct lws_ss_handle *h)
 
void(* proxy_req_write )(lws_transport_priv_t priv)
 
lws_ss_state_return_t(* event_proxy_can_write )(lws_transport_priv_t priv)
 
int(* proxy_write )(lws_transport_priv_t priv, uint8_t *buf, size_t *len)
 
lws_ss_state_return_t(* event_close_conn )(struct lws_sss_proxy_conn *conn)
 
lws_ss_state_return_t(* close_conn )(struct lws_sss_proxy_conn *conn)
 
lws_ss_state_return_t(* proxy_read )(lws_transport_priv_t priv, const uint8_t *buf, size_t len)
 
void(* event_client_up )(lws_transport_priv_t priv)
 
int(* proxy_check_write_more )(lws_transport_priv_t priv)
 
uint32_t flags
 

Detailed Description

Definition at line 394 of file lws-secure-streams-serialization.h.

Field Documentation

◆ name

const char* lws_transport_proxy_ops::name

Definition at line 395 of file lws-secure-streams-serialization.h.

◆ init_proxy_server

int(* lws_transport_proxy_ops::init_proxy_server) (struct lws_context *context, const struct lws_transport_proxy_ops *txp_ops_inward, lws_transport_priv_t txp_priv_inward, lws_txp_path_proxy_t *txp_ppath, const void *aux, const char *bind, int port)

Instantiate a proxy transport... bind/port are as shown for wsi transport, but may be overloaded to provide transport-specific init

Definition at line 396 of file lws-secure-streams-serialization.h.

◆ destroy_proxy_server

int(* lws_transport_proxy_ops::destroy_proxy_server) (struct lws_context *context)

Definition at line 403 of file lws-secure-streams-serialization.h.

◆ event_new_conn

lws_ss_state_return_t(* lws_transport_proxy_ops::event_new_conn) (struct lws_context *cx, const struct lws_transport_proxy_ops *txp_ops_inward, lws_transport_priv_t txp_priv_inward, struct lws_sss_proxy_conn **conn, lws_transport_priv_t txp_priv)

proxy has received a new connection from client

Definition at line 404 of file lws-secure-streams-serialization.h.

◆ event_onward_bind

void(* lws_transport_proxy_ops::event_onward_bind) (lws_transport_priv_t priv, struct lws_ss_handle *h)

Called when the proxy creates an onward SS for a client channel

Definition at line 413 of file lws-secure-streams-serialization.h.

◆ proxy_req_write

void(* lws_transport_proxy_ops::proxy_req_write) (lws_transport_priv_t priv)

Request a write to the proxy on this channel

Definition at line 416 of file lws-secure-streams-serialization.h.

◆ event_proxy_can_write

lws_ss_state_return_t(* lws_transport_proxy_ops::event_proxy_can_write) (lws_transport_priv_t priv)

Transport can now be written on, after earlier proxy_req_write

Definition at line 418 of file lws-secure-streams-serialization.h.

◆ proxy_write

int(* lws_transport_proxy_ops::proxy_write) (lws_transport_priv_t priv, uint8_t *buf, size_t *len)

Write the requested data on the channel to the proxy *** MUST have LWS_PRE usable behind buf. May do partial writes, len is set on return to actual length written

Definition at line 425 of file lws-secure-streams-serialization.h.

◆ event_close_conn

lws_ss_state_return_t(* lws_transport_proxy_ops::event_close_conn) (struct lws_sss_proxy_conn *conn)

proxy sees an existing conn closes

Definition at line 429 of file lws-secure-streams-serialization.h.

◆ close_conn

lws_ss_state_return_t(* lws_transport_proxy_ops::close_conn) (struct lws_sss_proxy_conn *conn)

called to handle closure of underlying transport

Definition at line 436 of file lws-secure-streams-serialization.h.

◆ proxy_read

lws_ss_state_return_t(* lws_transport_proxy_ops::proxy_read) (lws_transport_priv_t priv, const uint8_t *buf, size_t len)

Definition at line 438 of file lws-secure-streams-serialization.h.

◆ event_client_up

void(* lws_transport_proxy_ops::event_client_up) (lws_transport_priv_t priv)

Called when the proxy has accepted a new client conn

Definition at line 440 of file lws-secure-streams-serialization.h.

◆ proxy_check_write_more

int(* lws_transport_proxy_ops::proxy_check_write_more) (lws_transport_priv_t priv)

optional, allows checking if we can write again

Definition at line 442 of file lws-secure-streams-serialization.h.

◆ flags

uint32_t lws_transport_proxy_ops::flags

Definition at line 444 of file lws-secure-streams-serialization.h.


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