Home | History | Annotate | Download | only in microspdy

Lines Matching defs:stream

20  * @file stream.c
39 struct SPDYF_Stream *stream;
44 //not all fields are received to create new stream
50 //get stream id of the new stream
56 //wrong stream id sent by client
72 //set highest stream id for session
75 //get assoc stream id of the new stream
81 //get stream priority (3 bits)
90 if(NULL == (stream = malloc(sizeof(struct SPDYF_Stream))))
97 memset(stream,0, sizeof(struct SPDYF_Stream));
98 stream->session = session;
99 stream->stream_id = stream_id;
100 stream->assoc_stream_id = assoc_stream_id;
101 stream->priority = priority;
102 stream->slot = slot;
103 stream->is_in_closed = (frame->flags & SPDY_SYN_STREAM_FLAG_FIN) != 0;
104 stream->flag_unidirectional = (frame->flags & SPDY_SYN_STREAM_FLAG_UNIDIRECTIONAL) != 0;
105 stream->is_out_closed = stream->flag_unidirectional;
106 stream->is_server_initiator = false;
107 stream->window_size = SPDYF_INITIAL_WINDOW_SIZE;
109 //put the stream to the list of streams for the session
110 DLL_insert(session->streams_head, session->streams_tail, stream);
117 SPDYF_stream_destroy(struct SPDYF_Stream *stream)
119 SPDY_name_value_destroy(stream->headers);
120 free(stream);
121 stream = NULL;
128 struct SPDYF_Stream * stream = response_queue->stream;
132 stream->is_out_closed = (bool)(response_queue->data_frame->flags & SPDY_DATA_FLAG_FIN);
139 stream->is_out_closed = (bool)(response_queue->control_frame->flags & SPDY_SYN_REPLY_FLAG_FIN);
143 if(NULL != stream)
145 stream->is_out_closed = true;
146 stream->is_in_closed = true;
161 struct SPDYF_Stream * stream = session->streams_head;
163 while(NULL != stream && stream_id != stream->stream_id)
165 stream = stream->next;
168 return stream;