jabberd2
2.2.16
|
#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 | |
int | sx_can_read (sx_t s) |
we can read | |
static int | _sx_get_pending_write (sx_t s) |
we can write | |
int | sx_can_write (sx_t s) |
int | _sx_nad_write (sx_t s, nad_t nad, int elem) |
send a new nad out | |
void | sx_nad_write_elem (sx_t s, nad_t nad, int elem) |
app version | |
int | _sx_raw_write (sx_t s, char *buf, int len) |
send raw data out | |
void | sx_raw_write (sx_t s, char *buf, int len) |
app version | |
void | _sx_close (sx_t s) |
close a stream | |
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_st::rbytes, _sx_buf_st::len, _sx_st::expat, _sx_buf_st::data, _sx_st::fail, _sx_debug, ZONE, _sx_gen_error, SX_ERR_XML_PARSE, _sx_event, event_ERROR, _sx_error(), stream_err_XML_NOT_WELL_FORMED, _sx_close(), _sx_buffer_free(), _sx_st::rbytesmax, stream_err_POLICY_VIOLATION, _sx_st::state, state_STREAM, jqueue_pull(), _sx_st::rnadq, nad_print(), NAD_ENS, NAD_NURI_L, uri_STREAMS, NAD_NURI, NAD_ENAME_L, NAD_ENAME, nad_find_scoped_namespace(), uri_STREAM_ERR, nad_find_elem(), NAD_CDATA_L, NAD_CDATA, state_CLOSING, SX_ERR_STREAM, _sx_state, nad_free(), _sx_chain_nad_read(), _sx_st::env, _sx_env_st::nplugins, _sx_env_st::plugins, _sx_plugin_st::process, event_PACKET, _sx_st::depth, state_STREAM_SENT, jqueue_push(), _sx_st::wbufq, _sx_buffer_new(), and _sx_st::want_write.
Referenced by sx_can_read(), and _sx_server_notify_header().
int sx_can_read | ( | sx_t | s | ) |
we can read
Definition at line 181 of file io.c.
References _sx_st::want_read, _sx_st::state, state_CLOSING, _sx_debug, ZONE, _sx_st::tag, _sx_buffer_new(), _sx_event, event_READ, _sx_buffer_free(), _sx_st::want_write, _sx_chain_io_read(), event_WANT_WRITE, _sx_buf_st::len, _sx_buf_st::data, _sx_process_read(), _sx_state, state_CLOSED, and event_CLOSED.
Referenced by _c2s_client_mio_callback(), c2s_router_mio_callback(), _c2s_time_checks(), sm_mio_callback(), router_mio_callback(), s2s_router_mio_callback(), in_mio_callback(), and _out_mio_callback().
static int _sx_get_pending_write | ( | sx_t | s | ) | [static] |
we can write
Definition at line 261 of file io.c.
References _sx_st::wbufpending, jqueue_pull(), _sx_st::wbufq, _sx_buffer_new(), _sx_st::want_write, jqueue_size(), _sx_buf_st::data, _sx_buf_st::len, _sx_buf_st::notify, _sx_buf_st::notify_arg, _sx_debug, ZONE, _sx_chain_io_write(), jqueue_push(), _jqueue_st::front, _jqueue_node_st::priority, _sx_st::want_read, and _sx_buffer_free().
Referenced by sx_can_write().
int sx_can_write | ( | sx_t | s | ) |
Definition at line 318 of file io.c.
References _sx_st::want_write, _sx_st::state, state_CLOSING, _sx_debug, ZONE, _sx_st::tag, _sx_get_pending_write(), sx_kill(), _sx_st::wbufpending, _sx_st::want_read, _sx_event, event_WANT_READ, _sx_buf_st::len, event_WRITE, _sx_buffer_free(), _sx_state, state_CLOSED, and event_CLOSED.
Referenced by _c2s_client_mio_callback(), c2s_router_mio_callback(), sm_mio_callback(), router_mio_callback(), s2s_router_mio_callback(), in_mio_callback(), and _out_mio_callback().
send a new nad out
sending a nad (internal)
Definition at line 388 of file io.c.
References _sx_st::state, state_CLOSING, log_debug, ZONE, nad_free(), _sx_chain_nad_write(), nad_print(), _sx_debug, jqueue_push(), _sx_st::wbufq, _sx_buffer_new(), and _sx_st::want_write.
Referenced by sx_nad_write_elem(), _sx_sasl_client_process(), _sx_sasl_server_process(), and _sx_sasl_process().
app version
sending a nad
Definition at line 420 of file io.c.
References _sx_nad_write(), _sx_st::want_write, _sx_event, event_WANT_WRITE, _sx_st::want_read, and event_WANT_READ.
Referenced by c2s_router_sx_callback(), _router_comp_write(), and out_packet().
int _sx_raw_write | ( | sx_t | s, |
char * | buf, | ||
int | len | ||
) |
send raw data out
Definition at line 435 of file io.c.
References _sx_st::state, state_CLOSING, log_debug, ZONE, _sx_debug, jqueue_push(), _sx_st::wbufq, _sx_buffer_new(), and _sx_st::want_write.
Referenced by sx_raw_write().
JABBERD2_API void sx_raw_write | ( | sx_t | s, |
char * | buf, | ||
int | len | ||
) |
app version
sending raw data
sending raw data (internal)
Definition at line 454 of file io.c.
References _sx_raw_write(), _sx_st::want_write, _sx_event, event_WANT_WRITE, _sx_st::want_read, and event_WANT_READ.
Referenced by _c2s_time_checks(), _router_time_checks(), and _s2s_time_checks().
void _sx_close | ( | sx_t | s | ) |
close a stream
Definition at line 470 of file io.c.
References _sx_st::state, state_STREAM_SENT, jqueue_push(), _sx_st::wbufq, _sx_buffer_new(), _sx_st::want_write, _sx_state, and state_CLOSING.
Referenced by _sx_process_read(), sx_close(), _sx_ssl_wio(), and _sx_ssl_rio().
void sx_close | ( | sx_t | s | ) |
Definition at line 480 of file io.c.
References _sx_st::state, state_CLOSING, state_STREAM_SENT, _sx_close(), _sx_event, event_WANT_WRITE, _sx_state, state_CLOSED, and event_CLOSED.
Referenced by _c2s_client_sx_callback(), _c2s_component_presence(), c2s_router_sx_callback(), _c2s_time_checks(), JABBER_MAIN(), _s2s_check_conn_routes(), _s2s_time_checks(), sm_sx_callback(), _router_process_handshake(), _router_sx_callback(), s2s_router_sx_callback(), _out_result(), _out_verify(), _sx_compress_wio(), _sx_compress_rio(), _sx_ssl_handshake(), _sx_ssl_wio(), and _sx_ssl_rio().
void sx_kill | ( | sx_t | s | ) |
Definition at line 495 of file io.c.
References _sx_state, state_CLOSED, _sx_event, and event_CLOSED.
Referenced by _c2s_client_sx_callback(), _c2s_client_mio_callback(), c2s_router_sx_callback(), c2s_router_mio_callback(), sm_sx_callback(), sm_mio_callback(), _router_sx_callback(), router_mio_callback(), s2s_router_sx_callback(), s2s_router_mio_callback(), in_mio_callback(), _in_sx_callback(), _out_mio_callback(), _out_sx_callback(), and sx_can_write().