GNU libmicrohttpd  0.9.29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
stream.h File Reference

SPDY streams handling. More...

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

Go to the source code of this file.

Functions

int SPDYF_stream_new (struct SPDY_Session *session)
 
void SPDYF_stream_destroy (struct SPDYF_Stream *stream)
 
void SPDYF_stream_set_flags_on_write (struct SPDYF_Response_Queue *response_queue)
 
struct SPDYF_StreamSPDYF_stream_find (uint32_t stream_id, struct SPDY_Session *session)
 

Detailed Description

SPDY streams handling.

Author
Andrey Uzunov

Definition in file stream.h.

Function Documentation

void SPDYF_stream_destroy ( struct SPDYF_Stream stream)

Destroys stream structure and whatever is in it.

Parameters
streamSPDY_Stream to destroy

Definition at line 117 of file stream.c.

References SPDYF_Stream::headers, NULL, and SPDY_name_value_destroy().

Referenced by SPDYF_session_destroy().

Here is the call graph for this function:

Here is the caller graph for this function:

struct SPDYF_Stream* SPDYF_stream_find ( uint32_t  stream_id,
struct SPDY_Session session 
)
read

Find and return a session's stream, based on stream's ID.

Parameters
stream_idto search for
sessionwhose streams are considered
Returns
SPDY_Stream with the desired ID. Can be NULL.

Definition at line 159 of file stream.c.

References SPDYF_Stream::next, NULL, SPDYF_Stream::stream_id, and SPDY_Session::streams_head.

Referenced by spdyf_handler_read_data().

Here is the caller graph for this function:

int SPDYF_stream_new ( struct SPDY_Session session)

Reads data from session's read buffer and tries to create a new SPDY stream. This function is called after control frame's header has been read from the buffer (after the length field). If bogus frame is received the function changes the read handler of the session and fails, i.e. there is no need of further error handling by the caller.

Parameters
sessionSPDY_Session whose read buffer is being read
Returns
SPDY_YES if a new SPDY stream request was correctly received and handled. SPDY_NO if the whole SPDY frame was not yet received or memory error occurred.

Definition at line 32 of file stream.c.

References SPDYF_Stream::assoc_stream_id, DLL_insert, SPDYF_Stream::flag_unidirectional, SPDY_Session::frame_handler, SPDY_Session::frame_handler_cls, SPDY_Session::is_goaway_sent, SPDYF_Stream::is_in_closed, SPDYF_Stream::is_out_closed, SPDYF_Stream::is_server_initiator, SPDY_Session::last_in_stream_id, NTOH31, NULL, SPDYF_Stream::priority, SPDY_Session::read_buffer, SPDY_Session::read_buffer_beginning, SPDY_Session::read_buffer_offset, SPDYF_Stream::session, SPDYF_Stream::slot, SPDY_NO, SPDY_SYN_STREAM_FLAG_FIN, SPDY_SYN_STREAM_FLAG_UNIDIRECTIONAL, SPDY_YES, SPDYF_DEBUG, SPDYF_handler_ignore_frame(), SPDYF_INITIAL_WINDOW_SIZE, SPDYF_Stream::stream_id, SPDY_Session::streams_head, SPDY_Session::streams_tail, and SPDYF_Stream::window_size.

Referenced by spdyf_handler_read_syn_stream().

Here is the call graph for this function:

Here is the caller graph for this function:

void SPDYF_stream_set_flags_on_write ( struct SPDYF_Response_Queue response_queue)

Set stream flags if needed based on the type of the frame that was just sent (e.g., close stream if it was RST_STREAM).

Parameters
response_queuesent for this stream

Definition at line 126 of file stream.c.

References SPDYF_Response_Queue::control_frame, SPDYF_Response_Queue::data_frame, SPDYF_Stream::is_in_closed, SPDYF_Stream::is_out_closed, NULL, SPDY_CONTROL_FRAME_TYPES_RST_STREAM, SPDY_CONTROL_FRAME_TYPES_SYN_REPLY, SPDY_DATA_FLAG_FIN, SPDY_SYN_REPLY_FLAG_FIN, and SPDYF_Response_Queue::stream.

Referenced by SPDYF_session_write().

Here is the caller graph for this function: