00001 /* 00002 This file is part of libmicrospdy 00003 Copyright (C) 2012 Andrey Uzunov 00004 00005 This program is free software: you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation, either version 3 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00025 #ifndef SESSION_H 00026 #define SESSION_H 00027 00028 #include "platform.h" 00029 #include "structures.h" 00030 00043 int 00044 SPDYF_session_read (struct SPDY_Session *session); 00045 00046 00067 int 00068 SPDYF_session_write (struct SPDY_Session *session, 00069 bool only_one_frame); 00070 00071 00085 int 00086 SPDYF_session_idle (struct SPDY_Session *session); 00087 00088 00095 void 00096 SPDYF_session_close (struct SPDY_Session *session); 00097 00098 00107 int 00108 SPDYF_session_accept(struct SPDY_Daemon *daemon); 00109 00110 00125 void 00126 SPDYF_queue_response (struct SPDYF_Response_Queue *response_to_queue, 00127 struct SPDY_Session *session, 00128 int consider_priority); 00129 00130 00137 void 00138 SPDYF_session_destroy(struct SPDY_Session *session); 00139 00140 00152 int 00153 SPDYF_prepare_goaway (struct SPDY_Session *session, 00154 enum SPDY_GOAWAY_STATUS status, 00155 bool in_front); 00156 00157 00170 int 00171 SPDYF_prepare_rst_stream (struct SPDY_Session *session, 00172 struct SPDYF_Stream * stream, 00173 enum SPDY_RST_STREAM_STATUS status); 00174 00175 00187 int 00188 SPDYF_prepare_window_update (struct SPDY_Session *session, 00189 struct SPDYF_Stream * stream, 00190 int32_t delta_window_size); 00191 00192 00207 int 00208 SPDYF_handler_write_data (struct SPDY_Session *session); 00209 00210 00222 int 00223 SPDYF_handler_write_syn_reply (struct SPDY_Session *session); 00224 00225 00236 int 00237 SPDYF_handler_write_goaway (struct SPDY_Session *session); 00238 00239 00250 int 00251 SPDYF_handler_write_rst_stream (struct SPDY_Session *session); 00252 00253 00264 int 00265 SPDYF_handler_write_window_update (struct SPDY_Session *session); 00266 00267 00278 void 00279 SPDYF_handler_ignore_frame (struct SPDY_Session *session); 00280 00281 #endif