MIO read/write functions to read/write on unencrypted network sockets. More...
#include <jabberd.h>Functions | |
| void | _mio_raw_parser (mio m, const void *buf, size_t bufsz) |
| ssize_t | _mio_raw_read (mio m, void *buf, size_t count) |
| ssize_t | _mio_raw_write (mio m, void *buf, size_t count) |
MIO read/write functions to read/write on unencrypted network sockets.
| void _mio_raw_parser | ( | mio | m, | |
| const void * | buf, | |||
| size_t | bufsz | |||
| ) |
receiving bytes on a network socket
the _mio_raw_parser implements a mio parser, that does not parse the received data at all, but just passes the received data as bytes to the application callback function, that registered for this mio object
| m | the mio object where the data has been read | |
| buf | the data that has been read | |
| bufsz | the number of bytes, that have been read on the socket |
References mio_st::cb, mio_st::cb_arg, and MIO_BUFFER.
| ssize_t _mio_raw_read | ( | mio | m, | |
| void * | buf, | |||
| size_t | count | |||
| ) |
read data from a network socket, that does not use TLS encryption
m->flags.recall_read_when_writeable is cleared, m->flags.recall_read_when_readable is updated by this function
| m | the mio representing this socket | |
| buf | the buffer where to read data to | |
| count | size of the buffer, how many data should be read at most |
References mio_st::fd.
| ssize_t _mio_raw_write | ( | mio | m, | |
| void * | buf, | |||
| size_t | count | |||
| ) |
write data to a network socket, that does not use TLS encryption
m->flags.recall_write_when_readable is clared, m->flags.recall_write_when_writeable is updated by this function
| m | the mio representing this socket | |
| buf | the data that should be written | |
| count | how many bytes should be written (at most) |
References mio_st::fd.
1.6.3