SPDY_Session Struct Reference

#include </builddir/build/BUILD/libmicrohttpd-0.9.33/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 [read]

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

Length of the foreign address.

Definition at line 788 of file structures.h.

Referenced by SPDY_get_remote_addr(), and SPDYF_session_accept().

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

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

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

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

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

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

Function to read data from socket.

Definition at line 706 of file structures.h.

Referenced by SPDYF_io_set_session(), and SPDYF_session_read().

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.

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

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

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

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

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

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

Definition at line 800 of file structures.h.

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

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

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

This is a doubly-linked list.

Definition at line 628 of file structures.h.

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

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

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

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

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

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

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

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

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

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

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:

Generated on 17 Oct 2014 for GNU libmicrohttpd by  doxygen 1.6.1