GNU libmicrohttpd  0.9.29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
SPDY_Session Struct Reference

#include </builddir/build/BUILD/libmicrohttpd-0.9.34/src/microspdy/structures.h>

Data Fields

z_stream zlib_recv_stream
 
z_stream zlib_send_stream
 
struct SPDY_Sessionnext
 
struct SPDY_Sessionprev
 
struct SPDY_Daemondaemon
 
struct sockaddr * addr
 
struct SPDYF_Streamstreams_head
 
struct SPDYF_Streamstreams_tail
 
void * io_context
 
struct SPDYF_Response_Queueresponse_queue_head
 
struct SPDYF_Response_Queueresponse_queue_tail
 
void * read_buffer
 
void * write_buffer
 
void(* frame_handler )(struct SPDY_Session *session)
 
void * frame_handler_cls
 
void * user_cls
 
SPDYF_IONewSession fio_new_session
 
SPDYF_IOCloseSession fio_close_session
 
SPDYF_IORecv fio_recv
 
SPDYF_IOSend fio_send
 
SPDYF_IOIsPending fio_is_pending
 
SPDYF_IOBeforeWrite fio_before_write
 
SPDYF_IOAfterWrite fio_after_write
 
size_t read_ignore_bytes
 
size_t read_buffer_size
 
size_t read_buffer_offset
 
size_t read_buffer_beginning
 
size_t write_buffer_size
 
size_t write_buffer_offset
 
size_t write_buffer_beginning
 
unsigned long long last_activity
 
int socket_fd
 
socklen_t addr_len
 
uint32_t last_in_stream_id
 
uint32_t last_out_stream_id
 
uint32_t last_replied_to_stream_id
 
uint32_t current_stream_id
 
uint32_t max_num_frames
 
enum SPDY_SESSION_STATUS status
 
bool read_closed
 
bool is_goaway_sent
 
bool is_goaway_received
 

Detailed Description

Represents a SPDY session which is just a TCP connection

Definition at line 602 of file structures.h.

Field Documentation

struct sockaddr* SPDY_Session::addr

Foreign address (of length addr_len).

Definition at line 638 of file structures.h.

Referenced by SPDY_get_remote_addr(), SPDYF_session_accept(), and SPDYF_session_destroy().

socklen_t SPDY_Session::addr_len

Length of the foreign address.

Definition at line 788 of file structures.h.

Referenced by SPDY_get_remote_addr(), and SPDYF_session_accept().

uint32_t SPDY_Session::current_stream_id

Shows the stream id of the currently handled frame. This value is to be used when sending RST_STREAM in answer to a problematic frame, e.g. larger than supported.

Definition at line 816 of file structures.h.

Referenced by spdyf_handler_read_syn_stream(), and SPDYF_session_idle().

SPDYF_IOAfterWrite SPDY_Session::fio_after_write

Function to call after writing set of frames.

Definition at line 726 of file structures.h.

Referenced by SPDYF_io_set_session(), and SPDYF_session_write().

SPDYF_IOBeforeWrite SPDY_Session::fio_before_write

Function to call before writing set of frames.

Definition at line 721 of file structures.h.

Referenced by SPDYF_io_set_session(), and SPDYF_session_write().

SPDYF_IOCloseSession SPDY_Session::fio_close_session

Function to deinitialize the IO context for a session.

Definition at line 701 of file structures.h.

Referenced by SPDYF_io_set_session(), SPDYF_session_accept(), and SPDYF_session_close().

SPDYF_IOIsPending SPDY_Session::fio_is_pending

Function to check for pending data in IO buffers.

Definition at line 716 of file structures.h.

Referenced by SPDYF_get_fdset(), SPDYF_get_timeout(), SPDYF_io_set_session(), and SPDYF_run().

SPDYF_IONewSession SPDY_Session::fio_new_session

Function to initialize the IO context for a new session.

Definition at line 696 of file structures.h.

Referenced by SPDYF_io_set_session(), and SPDYF_session_accept().

SPDYF_IORecv SPDY_Session::fio_recv

Function to read data from socket.

Definition at line 706 of file structures.h.

Referenced by SPDYF_io_set_session(), and SPDYF_session_read().

SPDYF_IOSend SPDY_Session::fio_send

Function to write data to socket.

Definition at line 711 of file structures.h.

Referenced by SPDYF_io_set_session(), and SPDYF_session_write().

void(* SPDY_Session::frame_handler)(struct SPDY_Session *session)

Specific handler for the frame that is currently being received.

Definition at line 680 of file structures.h.

Referenced by SPDYF_session_idle(), SPDYF_session_read(), and SPDYF_stream_new().

void* SPDY_Session::io_context

Unique IO context for the session. Initialized on each creation (actually when the TCP connection is established).

Definition at line 655 of file structures.h.

Referenced by SPDYF_openssl_close_session(), SPDYF_openssl_is_pending(), SPDYF_openssl_new_session(), SPDYF_openssl_recv(), and SPDYF_openssl_send().

bool SPDY_Session::is_goaway_received

If the server receives GOAWAY, it must not send new SYN_STREAMS on this session. Normally the client will soon close the TCP session.

Definition at line 853 of file structures.h.

Referenced by spdyf_handler_read_goaway().

bool SPDY_Session::is_goaway_sent

If the server sends GOAWAY, it must ignore all SYN_STREAMS for this session. Normally the server will soon close the TCP session.

Definition at line 846 of file structures.h.

Referenced by SPDYF_handler_write_goaway(), and SPDYF_stream_new().

unsigned long long SPDY_Session::last_activity

Last time this connection had any activity (reading or writing). In milliseconds.

Definition at line 776 of file structures.h.

Referenced by SPDYF_get_fdset(), SPDYF_get_timeout(), SPDYF_session_accept(), SPDYF_session_idle(), SPDYF_session_read(), and SPDYF_session_write().

uint32_t SPDY_Session::last_in_stream_id

The biggest stream ID for this session for streams initiated by the client.

Definition at line 794 of file structures.h.

Referenced by SPDYF_stream_new().

uint32_t SPDY_Session::last_out_stream_id

The biggest stream ID for this session for streams initiated by the server.

Definition at line 800 of file structures.h.

uint32_t SPDY_Session::last_replied_to_stream_id

This value is updated whenever SYN_REPLY or RST_STREAM are sent and is used later in GOAWAY frame. TODO it is not clear in the draft what happens when streams are not answered in the order of their IDs. Moreover, why should we send GOAWAY with the ID of received bogus SYN_STREAM with huge ID?

Definition at line 809 of file structures.h.

Referenced by SPDYF_handler_write_goaway(), and SPDYF_handler_write_syn_reply().

uint32_t SPDY_Session::max_num_frames

Maximum number of frames to be written to the socket at once. The library tries to send max_num_frames in a single call to SPDY_run for a single session. This means no requests can be received nor other sessions can send data as long the current one has enough frames to send and there is no error on writing.

Definition at line 825 of file structures.h.

Referenced by SPDYF_session_accept(), and SPDYF_session_write().

struct SPDY_Session* SPDY_Session::next

This is a doubly-linked list.

Definition at line 623 of file structures.h.

Referenced by SPDYF_get_fdset(), SPDYF_get_timeout(), and SPDYF_run().

struct SPDY_Session* SPDY_Session::prev

This is a doubly-linked list.

Definition at line 628 of file structures.h.

size_t SPDY_Session::read_buffer_beginning
size_t SPDY_Session::read_buffer_offset
size_t SPDY_Session::read_buffer_size

Size of read_buffer (in bytes). This value indicates how many bytes we're willing to read into the buffer; the real buffer is one byte longer to allow for adding zero-termination (when needed).

Definition at line 742 of file structures.h.

Referenced by SPDYF_session_accept(), and SPDYF_session_read().

bool SPDY_Session::read_closed

Has this socket been closed for reading (i.e. other side closed the connection)? If so, we must completely close the connection once we are done sending our response (and stop trying to read from this socket).

Definition at line 840 of file structures.h.

Referenced by SPDYF_session_close(), SPDYF_session_read(), and SPDYF_session_write().

size_t SPDY_Session::read_ignore_bytes

Number of bytes that the lib must ignore immediately after they are read from the TLS socket without adding them to the read buf. This is needed, for instance, when receiving frame bigger than the buffer to avoid deadlock situations.

Definition at line 734 of file structures.h.

Referenced by SPDYF_session_idle().

struct SPDYF_Response_Queue* SPDY_Session::response_queue_tail

Tail of doubly-linked list of the responses.

Definition at line 665 of file structures.h.

Referenced by SPDYF_handler_write_data(), SPDYF_queue_response(), SPDYF_session_destroy(), and SPDYF_session_write().

int SPDY_Session::socket_fd
struct SPDYF_Stream* SPDY_Session::streams_head

Head of doubly-linked list of the SPDY streams belonging to the session.

Definition at line 644 of file structures.h.

Referenced by spdyf_handler_read_rst_stream(), spdyf_handler_read_syn_stream(), SPDYF_session_destroy(), SPDYF_session_idle(), SPDYF_stream_find(), and SPDYF_stream_new().

struct SPDYF_Stream* SPDY_Session::streams_tail

Tail of doubly-linked list of the streams.

Definition at line 649 of file structures.h.

Referenced by SPDYF_session_destroy(), and SPDYF_stream_new().

void* SPDY_Session::user_cls

Extra field to be used by the user with set/get func for whatever purpose he wants.

Definition at line 691 of file structures.h.

Referenced by SPDY_get_cls_from_session(), and SPDY_set_cls_to_session().

size_t SPDY_Session::write_buffer_beginning

Position until where everything was already written to the socket

Definition at line 770 of file structures.h.

Referenced by SPDYF_handler_write_data(), SPDYF_handler_write_goaway(), SPDYF_handler_write_rst_stream(), SPDYF_handler_write_syn_reply(), SPDYF_handler_write_window_update(), and SPDYF_session_write().

size_t SPDY_Session::write_buffer_offset

Position where we currently append data in write_buffer (last valid position).

Definition at line 765 of file structures.h.

Referenced by SPDYF_handler_write_data(), SPDYF_handler_write_goaway(), SPDYF_handler_write_rst_stream(), SPDYF_handler_write_syn_reply(), SPDYF_handler_write_window_update(), and SPDYF_session_write().

size_t SPDY_Session::write_buffer_size

Size of write_buffer (in bytes). This value indicates how many bytes we're willing to prepare for writing.

Definition at line 759 of file structures.h.

Referenced by SPDYF_handler_write_data(), SPDYF_handler_write_goaway(), SPDYF_handler_write_rst_stream(), SPDYF_handler_write_syn_reply(), SPDYF_handler_write_window_update(), and SPDYF_session_write().

z_stream SPDY_Session::zlib_recv_stream

zlib stream for decompressing all the name/pair values from the received frames. All the received compressed data must be decompressed within one context: this stream. Thus, it should be unique for the session and initialized at its creation.

Definition at line 610 of file structures.h.

Referenced by spdyf_handler_read_syn_stream(), SPDYF_session_accept(), and SPDYF_session_destroy().

z_stream SPDY_Session::zlib_send_stream

zlib stream for compressing all the name/pair values from the frames to be sent. All the sent compressed data must be compressed within one context: this stream. Thus, it should be unique for the session and initialized at its creation.

Definition at line 618 of file structures.h.

Referenced by SPDYF_handler_write_syn_reply(), SPDYF_session_accept(), and SPDYF_session_destroy().


The documentation for this struct was generated from the following file: