jabberd2
2.6.1
|
#include "sx.h"
Go to the source code of this file.
Functions | |
void | _sx_process_read (sx_t s, sx_buf_t buf) |
handler for read data More... | |
int | sx_can_read (sx_t s) |
we can read More... | |
static int | _sx_get_pending_write (sx_t s) |
we can write More... | |
int | sx_can_write (sx_t s) |
int | _sx_nad_write (sx_t s, nad_t nad, int elem) |
send a new nad out More... | |
void | sx_nad_write_elem (sx_t s, nad_t nad, int elem) |
app version More... | |
int | _sx_raw_write (sx_t s, const char *buf, int len) |
send raw data out More... | |
void | sx_raw_write (sx_t s, const char *buf, int len) |
app version More... | |
void | _sx_close (sx_t s) |
close a stream More... | |
void | sx_close (sx_t s) |
void | sx_kill (sx_t s) |
handler for read data
processor for incoming wire data
Definition at line 24 of file io.c.
References _sx_buffer_free(), _sx_buffer_new(), _sx_chain_nad_read(), _sx_close(), _sx_debug, _sx_error(), _sx_event, _sx_gen_error, _sx_state, _sx_buf_st::data, _sx_st::depth, _sx_st::env, event_ERROR, event_PACKET, _sx_st::expat, _sx_st::fail, _sx_st::flags, jqueue_pull(), jqueue_push(), _sx_buf_st::len, NAD_CDATA, NAD_CDATA_L, NAD_ENAME, NAD_ENAME_L, NAD_ENS, nad_find_elem(), nad_find_scoped_namespace(), nad_free(), NAD_NURI, NAD_NURI_L, nad_print(), _sx_env_st::nplugins, _sx_st::pbytes, _sx_env_st::plugins, _sx_plugin_st::process, _sx_st::rbytesmax, _sx_st::rnadq, _sx_st::state, state_CLOSING, state_STREAM, state_STREAM_SENT, stream_err_POLICY_VIOLATION, stream_err_XML_NOT_WELL_FORMED, SX_ERR_STREAM, SX_ERR_XML_PARSE, SX_WEBSOCKET_WRAPPER, _sx_st::tbytes, uri_STREAM_ERR, uri_STREAMS, uri_XFRAMING, _sx_st::want_write, _sx_st::wbufq, and ZONE.
Referenced by _sx_server_notify_header(), and sx_can_read().
int sx_can_read | ( | sx_t | s | ) |
we can read
Definition at line 196 of file io.c.
References _sx_buffer_free(), _sx_buffer_new(), _sx_chain_io_read(), _sx_debug, _sx_event, _sx_process_read(), _sx_state, _sx_buf_st::data, event_CLOSED, event_READ, event_WANT_WRITE, _sx_buf_st::len, _sx_st::pbytes, _sx_st::rbytes, _sx_st::rbytesmax, _sx_st::state, state_CLOSED, state_CLOSING, _sx_st::tag, _sx_st::want_read, _sx_st::want_write, and ZONE.
Referenced by _c2s_client_mio_callback(), _c2s_time_checks(), _out_mio_callback(), c2s_router_mio_callback(), in_mio_callback(), router_mio_callback(), s2s_router_mio_callback(), and sm_mio_callback().
|
static |
we can write
Definition at line 287 of file io.c.
References _sx_buffer_free(), _sx_buffer_new(), _sx_chain_io_write(), _sx_debug, _sx_buf_st::data, _jqueue_st::front, jqueue_pull(), jqueue_push(), jqueue_size(), _sx_buf_st::len, _sx_buf_st::notify, _sx_buf_st::notify_arg, _jqueue_node_st::priority, _sx_st::want_read, _sx_st::want_write, _sx_st::wbufpending, _sx_st::wbufq, and ZONE.
Referenced by sx_can_write().
int sx_can_write | ( | sx_t | s | ) |
Definition at line 347 of file io.c.
References _sx_buffer_free(), _sx_debug, _sx_event, _sx_get_pending_write(), _sx_state, event_CLOSED, event_WANT_READ, event_WRITE, _sx_buf_st::len, _sx_st::state, state_CLOSED, state_CLOSING, sx_kill(), _sx_st::tag, _sx_st::want_read, _sx_st::want_write, _sx_st::wbufpending, and ZONE.
Referenced by _c2s_client_mio_callback(), _out_mio_callback(), c2s_router_mio_callback(), in_mio_callback(), router_mio_callback(), s2s_router_mio_callback(), and sm_mio_callback().
send a new nad out
sending a nad (internal)
Definition at line 417 of file io.c.
References _sx_buffer_new(), _sx_chain_nad_write(), _sx_debug, jqueue_push(), log_debug, nad_free(), nad_print(), _sx_st::state, state_CLOSING, _sx_st::want_write, _sx_st::wbufq, and ZONE.
Referenced by _sx_sasl_client_process(), _sx_sasl_process(), _sx_sasl_server_process(), and sx_nad_write_elem().
app version
sending a nad
Definition at line 449 of file io.c.
References _sx_event, _sx_nad_write(), event_WANT_READ, event_WANT_WRITE, _sx_st::want_read, and _sx_st::want_write.
Referenced by _router_comp_write(), c2s_router_sx_callback(), and out_packet().
int _sx_raw_write | ( | sx_t | s, |
const char * | buf, | ||
int | len | ||
) |
send raw data out
Definition at line 464 of file io.c.
References _sx_buffer_new(), _sx_debug, jqueue_push(), log_debug, _sx_st::state, state_CLOSING, _sx_st::want_write, _sx_st::wbufq, and ZONE.
Referenced by sx_raw_write().
JABBERD2_API void sx_raw_write | ( | sx_t | s, |
const char * | buf, | ||
int | len | ||
) |
app version
sending raw data
sending raw data (internal)
Definition at line 483 of file io.c.
References _sx_event, _sx_raw_write(), event_WANT_READ, event_WANT_WRITE, _sx_st::want_read, and _sx_st::want_write.
Referenced by _c2s_time_checks(), _router_time_checks(), and _s2s_time_checks().
void _sx_close | ( | sx_t | s | ) |
close a stream
Definition at line 499 of file io.c.
References _sx_buffer_new(), _sx_state, _sx_st::flags, jqueue_push(), _sx_st::state, state_CLOSING, state_STREAM_SENT, SX_WEBSOCKET_WRAPPER, uri_XFRAMING, _sx_st::want_write, and _sx_st::wbufq.
Referenced by _sx_process_read(), _sx_ssl_rio(), _sx_ssl_wio(), and sx_close().
void sx_close | ( | sx_t | s | ) |
Definition at line 512 of file io.c.
References _sx_close(), _sx_event, _sx_state, event_CLOSED, event_WANT_WRITE, _sx_st::state, state_CLOSED, state_CLOSING, and state_STREAM_SENT.
Referenced by _c2s_client_sx_callback(), _c2s_component_presence(), _c2s_time_checks(), _out_result(), _out_verify(), _router_process_handshake(), _router_sx_callback(), _s2s_check_conn_routes(), _s2s_time_checks(), _sx_compress_rio(), _sx_compress_wio(), _sx_ssl_handshake(), _sx_ssl_rio(), _sx_ssl_wio(), _sx_websocket_rio(), c2s_router_sx_callback(), JABBER_MAIN(), libwebsock_close_with_reason(), libwebsock_fail_connection(), s2s_router_sx_callback(), and sm_sx_callback().
void sx_kill | ( | sx_t | s | ) |
Definition at line 527 of file io.c.
References _sx_event, _sx_state, event_CLOSED, and state_CLOSED.
Referenced by _c2s_client_mio_callback(), _c2s_client_sx_callback(), _in_sx_callback(), _out_mio_callback(), _out_sx_callback(), _router_sx_callback(), c2s_router_mio_callback(), c2s_router_sx_callback(), in_mio_callback(), router_mio_callback(), s2s_router_mio_callback(), s2s_router_sx_callback(), sm_mio_callback(), sm_sx_callback(), and sx_can_write().