|
jabberd14 1.6.2
|
handling of XML streams on network connections More...
Functions | |
| void | _mio_xstream_CDATA (void *_m, const char *cdata, int len) |
| void | _mio_xstream_cleanup (void *arg) |
| void | _mio_xstream_init (mio m) |
| void | _mio_xml_parser (mio m, const void *vbuf, size_t bufsz) |
| void | mio_xml_reset (mio m) |
| int | mio_xml_starttls (mio m, int originator, const char *identity) |
Variables | |
| ios | mio__data |
handling of XML streams on network connections
This file implements the functionality used to handle XML streams over network connections. The user can register a callback, that gets an event for the open tag for the root element and for the child elements of the root element (including their child elements).
| void _mio_xml_parser | ( | mio | m, |
| const void * | vbuf, | ||
| size_t | bufsz | ||
| ) |
receiving an XML document on a network socket
This parser implements an XML parser reading on a network socket. Stanzas (second level XML document elements) are passed to the application callback function, that registered with this mio object
| m | the mio where data has been read |
| vbuf | the buffer containing the read data |
| bufsz | the number of bytes, that have been read |
References _mio_xstream_cleanup(), _mio_xstream_init(), mio_main_st::bounce_uri, mio_st::cb, mio_st::cb_arg, mio_st::flags, mio_main_st::flash_policy, HTTP_BOUNCE_URI, log_debug2, log_error, log_notice(), log_warn(), LOGT_IO, LOGT_XML, mio_close(), MIO_ERROR, mio_write(), mio_st::parser, mio_st::reset_stream, mio_st::root, mio_st::type, type_HTTP, type_NORMAL, type_NUL, mio_main_st::webserver_path, and ZONE.
| void _mio_xstream_CDATA | ( | void * | _m, |
| const char * | cdata, | ||
| int | len | ||
| ) |
internal expat callback for CDATA nodes
| _m | the mio |
| cdata | content of the CDATA node (not zero terminated!) |
| len | length of the content |
References mio_st::stacknode, and xmlnode_insert_cdata().
Referenced by _mio_xstream_init().
| void _mio_xstream_cleanup | ( | void * | arg | ) |
destructor for a mio xstream, frees allocated memory
| arg | the mio of the xstream, that should be closed |
References mio_st::in_root, mio_st::in_stanza, mio_st::out_ns, mio_st::parser, mio_st::stacknode, and xmlnode_free().
Referenced by _mio_xml_parser(), and _mio_xstream_init().
| void _mio_xstream_init | ( | mio | m | ) |
init an xstream for a mio object
(allocates a XML parser instance)
| m | which mio object should be prepared for usage as an XML stream |
References _mio_xstream_CDATA(), _mio_xstream_cleanup(), mio_st::p, mio_st::parser, pool_cleanup(), and XMLNS_SEPARATOR.
Referenced by _mio_xml_parser().
| void mio_xml_reset | ( | mio | m | ) |
reset a stream (restart it)
| m | the stream to reset |
References mio_st::flags, and mio_st::reset_stream.
Referenced by dialback_in_read_db(), dialback_out_read(), and mio_xml_starttls().
| int mio_xml_starttls | ( | mio | m, |
| int | originator, | ||
| const char * | identity | ||
| ) |
restart a stream, starting the use of a TLS layer
| m | the connection |
| originator | 1 if we are the originator, 0 else |
| identity | identity to use for selecting the certificate |
References _mio_write_dump(), log_debug2, LOGT_IO, mio_ssl_starttls(), mio_xml_reset(), and ZONE.
Referenced by dialback_in_read_db(), and dialback_out_read().
1.7.4