GNU libmicrohttpd
0.9.29
|
Signatures for IO functions. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | SPDYF_IOGlobalInit) () |
typedef void(* | SPDYF_IOGlobalDeinit) () |
typedef int(* | SPDYF_IOInit) (struct SPDY_Daemon *daemon) |
typedef void(* | SPDYF_IODeinit) (struct SPDY_Daemon *daemon) |
typedef int(* | SPDYF_IONewSession) (struct SPDY_Session *session) |
typedef void(* | SPDYF_IOCloseSession) (struct SPDY_Session *session) |
typedef int(* | SPDYF_IORecv) (struct SPDY_Session *session, void *buffer, size_t size) |
typedef int(* | SPDYF_IOSend) (struct SPDY_Session *session, const void *buffer, size_t size) |
typedef int(* | SPDYF_IOIsPending) (struct SPDY_Session *session) |
typedef int(* | SPDYF_IOBeforeWrite) (struct SPDY_Session *session) |
typedef int(* | SPDYF_IOAfterWrite) (struct SPDY_Session *session, int was_written) |
Enumerations | |
enum | SPDY_IO_ERROR { SPDY_IO_ERROR_CLOSED = 0, SPDY_IO_ERROR_ERROR = -2, SPDY_IO_ERROR_AGAIN = -3 } |
Functions | |
int | SPDYF_io_set_daemon (struct SPDY_Daemon *daemon, enum SPDY_IO_SUBSYSTEM io_subsystem) |
int | SPDYF_io_set_session (struct SPDY_Session *session, enum SPDY_IO_SUBSYSTEM io_subsystem) |
Signatures for IO functions.
Definition in file io.h.
typedef int(* SPDYF_IOAfterWrite) (struct SPDY_Session *session, int was_written) |
typedef int(* SPDYF_IOBeforeWrite) (struct SPDY_Session *session) |
typedef void(* SPDYF_IOCloseSession) (struct SPDY_Session *session) |
Deinitializing io for a specific connection. Should be called closing session's socket.
session | SPDY_Session whose socket is used |
typedef void(* SPDYF_IODeinit) (struct SPDY_Daemon *daemon) |
Deinitializing io context for a daemon. Should be called when the deamon is stopped.
daemon | SPDY_Daemon which is being stopped |
typedef void(* SPDYF_IOGlobalDeinit) () |
typedef void(* SPDYF_IOGlobalInit) () |
typedef int(* SPDYF_IOInit) (struct SPDY_Daemon *daemon) |
Initializing of io context for a specific daemon. Must be called when the daemon starts.
daemon | SPDY_Daemon for which io will be used. Daemon's certificate and key file are used for tls. |
typedef int(* SPDYF_IOIsPending) (struct SPDY_Session *session) |
typedef int(* SPDYF_IONewSession) (struct SPDY_Session *session) |
Initializing io for a specific connection. Must be called after the connection has been accepted.
session | SPDY_Session whose socket will be used |
typedef int(* SPDYF_IORecv) (struct SPDY_Session *session, void *buffer, size_t size) |
Reading from session's socket. Reads available data and put it to the buffer.
session | for which data is received |
buffer | where data from the socket will be written to |
size | of the buffer |
typedef int(* SPDYF_IOSend) (struct SPDY_Session *session, const void *buffer, size_t size) |
Writing to session's socket. Writes the data given into the buffer to the socket.
session | whose context is used |
buffer | from where data will be written to the socket |
size | number of bytes to be taken from the buffer |
enum SPDY_IO_ERROR |
Used for return code when reading and writing to the TLS socket.
int SPDYF_io_set_daemon | ( | struct SPDY_Daemon * | daemon, |
enum SPDY_IO_SUBSYSTEM | io_subsystem | ||
) |
Sets callbacks for the daemon with regard to the IO subsystem.
daemon | |
io_subsystem | the IO subsystem that will be initialized and used by daemon. |
Definition at line 32 of file io.c.
References SPDY_Daemon::fio_deinit, SPDY_Daemon::fio_init, SPDY_IO_SUBSYSTEM_NONE, SPDY_IO_SUBSYSTEM_OPENSSL, SPDY_IO_SUBSYSTEM_RAW, SPDY_NO, SPDY_YES, SPDYF_DEBUG, SPDYF_openssl_deinit(), SPDYF_openssl_init(), SPDYF_raw_deinit(), and SPDYF_raw_init().
Referenced by SPDYF_start_daemon_va().
int SPDYF_io_set_session | ( | struct SPDY_Session * | session, |
enum SPDY_IO_SUBSYSTEM | io_subsystem | ||
) |
Sets callbacks for the session with regard to the IO subsystem.
session | |
io_subsystem | the IO subsystem that will be initialized and used by session. |
Definition at line 58 of file io.c.
References SPDY_Session::fio_after_write, SPDY_Session::fio_before_write, SPDY_Session::fio_close_session, SPDY_Session::fio_is_pending, SPDY_Session::fio_new_session, SPDY_Session::fio_recv, SPDY_Session::fio_send, SPDY_IO_SUBSYSTEM_NONE, SPDY_IO_SUBSYSTEM_OPENSSL, SPDY_IO_SUBSYSTEM_RAW, SPDY_NO, SPDY_YES, SPDYF_DEBUG, SPDYF_openssl_after_write(), SPDYF_openssl_before_write(), SPDYF_openssl_close_session(), SPDYF_openssl_is_pending(), SPDYF_openssl_new_session(), SPDYF_openssl_recv(), SPDYF_openssl_send(), SPDYF_raw_after_write(), SPDYF_raw_before_write(), SPDYF_raw_close_session(), SPDYF_raw_is_pending(), SPDYF_raw_new_session(), SPDYF_raw_recv(), and SPDYF_raw_send().
Referenced by SPDYF_session_accept().