GNU libmicrohttpd
0.9.29
|
IO for SPDY without TLS. More...
#include "platform.h"
Go to the source code of this file.
Functions | |
void | SPDYF_raw_global_init () |
void | SPDYF_raw_global_deinit () |
int | SPDYF_raw_init (struct SPDY_Daemon *daemon) |
void | SPDYF_raw_deinit (struct SPDY_Daemon *daemon) |
int | SPDYF_raw_new_session (struct SPDY_Session *session) |
void | SPDYF_raw_close_session (struct SPDY_Session *session) |
int | SPDYF_raw_recv (struct SPDY_Session *session, void *buffer, size_t size) |
int | SPDYF_raw_send (struct SPDY_Session *session, const void *buffer, size_t size) |
int | SPDYF_raw_is_pending (struct SPDY_Session *session) |
int | SPDYF_raw_before_write (struct SPDY_Session *session) |
int | SPDYF_raw_after_write (struct SPDY_Session *session, int was_written) |
IO for SPDY without TLS.
Definition in file io_raw.h.
int SPDYF_raw_after_write | ( | struct SPDY_Session * | session, |
int | was_written | ||
) |
Unsets TCP_CORK.
session | |
was_written | has the same value as the write function for the session will return |
Definition at line 179 of file io_raw.c.
References SPDY_Session::daemon, SPDY_Daemon::flags, SPDY_Session::socket_fd, SPDY_DAEMON_FLAG_NO_DELAY, SPDY_YES, and SPDYF_DEBUG.
Referenced by SPDYF_io_set_session().
int SPDYF_raw_before_write | ( | struct SPDY_Session * | session | ) |
Sets TCP_CORK.
session |
Definition at line 160 of file io_raw.c.
References SPDY_Session::daemon, SPDY_Daemon::flags, SPDY_Session::socket_fd, SPDY_DAEMON_FLAG_NO_DELAY, SPDY_YES, and SPDYF_DEBUG.
Referenced by SPDYF_io_set_session().
void SPDYF_raw_close_session | ( | struct SPDY_Session * | session | ) |
Should be called closing session's socket.
session | SPDY_Session whose socket is used |
Definition at line 86 of file io_raw.c.
Referenced by SPDYF_io_set_session().
void SPDYF_raw_deinit | ( | struct SPDY_Daemon * | daemon | ) |
Should be called when the deamon is stopped.
daemon | SPDY_Daemon which is being stopped |
Definition at line 55 of file io_raw.c.
Referenced by SPDYF_io_set_daemon().
void SPDYF_raw_global_deinit | ( | ) |
Should be called at the end of the program.
Definition at line 40 of file io_raw.c.
Referenced by SPDY_deinit().
void SPDYF_raw_global_init | ( | ) |
Must be called only once in the program.
Definition at line 34 of file io_raw.c.
Referenced by SPDY_init().
int SPDYF_raw_init | ( | struct SPDY_Daemon * | daemon | ) |
Must be called when the daemon starts.
daemon | SPDY_Daemon |
Definition at line 46 of file io_raw.c.
References SPDY_YES.
Referenced by SPDYF_io_set_daemon().
int SPDYF_raw_is_pending | ( | struct SPDY_Session * | session | ) |
Checks if there is data staying in the buffers of the underlying system that waits to be read. Always returns SPDY_NO, as we do not use a subsystem here.
session | which is checked |
Definition at line 151 of file io_raw.c.
References SPDY_NO.
Referenced by SPDYF_io_set_session().
int SPDYF_raw_new_session | ( | struct SPDY_Session * | session | ) |
Must be called after the connection has been accepted.
session | SPDY_Session whose socket will be used |
Definition at line 62 of file io_raw.c.
References SPDY_Session::daemon, SPDY_Daemon::flags, SPDY_Session::socket_fd, SPDY_DAEMON_FLAG_NO_DELAY, SPDY_YES, and SPDYF_DEBUG.
Referenced by SPDYF_io_set_session().
int SPDYF_raw_recv | ( | struct SPDY_Session * | session, |
void * | buffer, | ||
size_t | size | ||
) |
Reading from 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 |
Definition at line 93 of file io_raw.c.
References EWOULDBLOCK, SPDY_Session::socket_fd, SPDY_IO_ERROR_AGAIN, and SPDY_IO_ERROR_ERROR.
Referenced by SPDYF_io_set_session().
int SPDYF_raw_send | ( | struct SPDY_Session * | session, |
const void * | buffer, | ||
size_t | size | ||
) |
Writing to 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 |
Definition at line 122 of file io_raw.c.
References EWOULDBLOCK, SPDY_Session::socket_fd, SPDY_IO_ERROR_AGAIN, and SPDY_IO_ERROR_ERROR.
Referenced by SPDYF_io_set_session().