GNU libmicrohttpd  0.9.29
io_raw.h File Reference

IO for SPDY without TLS. More...

#include "platform.h"
Include dependency graph for io_raw.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

IO for SPDY without TLS.

Author
Andrey Uzunov

Definition in file io_raw.h.

Function Documentation

int SPDYF_raw_after_write ( struct SPDY_Session session,
int  was_written 
)

Unsets TCP_CORK.

Parameters
session
was_writtenhas the same value as the write function for the session will return
Returns
returned value will be used by the write function to 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().

Here is the caller graph for this function:

int SPDYF_raw_before_write ( struct SPDY_Session session)

Sets TCP_CORK.

Parameters
session
Returns
SPDY_NO if writing must not happen in the call; SPDY_YES otherwise

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().

Here is the caller graph for this function:

void SPDYF_raw_close_session ( struct SPDY_Session session)

Should be called closing session's socket.

Parameters
sessionSPDY_Session whose socket is used

Definition at line 86 of file io_raw.c.

Referenced by SPDYF_io_set_session().

Here is the caller graph for this function:

void SPDYF_raw_deinit ( struct SPDY_Daemon daemon)

Should be called when the deamon is stopped.

Parameters
daemonSPDY_Daemon which is being stopped

Definition at line 55 of file io_raw.c.

Referenced by SPDYF_io_set_daemon().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

int SPDYF_raw_init ( struct SPDY_Daemon daemon)

Must be called when the daemon starts.

Parameters
daemonSPDY_Daemon
Returns
SPDY_YES on success or SPDY_NO on error

Definition at line 46 of file io_raw.c.

References SPDY_YES.

Referenced by SPDYF_io_set_daemon().

Here is the caller graph for this function:

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.

Parameters
sessionwhich is checked
Returns
SPDY_YES if data is pending or SPDY_NO otherwise

Definition at line 151 of file io_raw.c.

References SPDY_NO.

Referenced by SPDYF_io_set_session().

Here is the caller graph for this function:

int SPDYF_raw_new_session ( struct SPDY_Session session)

Must be called after the connection has been accepted.

Parameters
sessionSPDY_Session whose socket will be used
Returns
SPDY_NO if some funcs fail. SPDY_YES otherwise

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().

Here is the caller graph for this function:

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.

Parameters
sessionfor which data is received
bufferwhere data from the socket will be written to
sizeof the buffer
Returns
number of bytes (at most size) read from the connection 0 if the other party has closed the connection SPDY_IO_ERROR code on error

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().

Here is the caller graph for this function:

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.

Parameters
sessionwhose context is used
bufferfrom where data will be written to the socket
sizenumber of bytes to be taken from the buffer
Returns
number of bytes (at most size) from the buffer that has been written to the connection 0 if the other party has closed the connection SPDY_IO_ERROR code on error

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().

Here is the caller graph for this function: