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 00027 #ifndef IO_OPENSSL_H 00028 #define IO_OPENSSL_H 00029 00030 #include "platform.h" 00031 #include "io.h" 00032 #include <openssl/err.h> 00033 #include <openssl/ssl.h> 00034 #include <openssl/rand.h> 00035 00036 00041 void 00042 SPDYF_openssl_global_init(); 00043 00044 00050 void 00051 SPDYF_openssl_global_deinit(); 00052 00053 00062 int 00063 SPDYF_openssl_init(struct SPDY_Daemon *daemon); 00064 00065 00072 void 00073 SPDYF_openssl_deinit(struct SPDY_Daemon *daemon); 00074 00075 00083 int 00084 SPDYF_openssl_new_session(struct SPDY_Session *session); 00085 00086 00093 void 00094 SPDYF_openssl_close_session(struct SPDY_Session *session); 00095 00096 00108 int 00109 SPDYF_openssl_recv(struct SPDY_Session *session, 00110 void * buffer, 00111 size_t size); 00112 00113 00126 int 00127 SPDYF_openssl_send(struct SPDY_Session *session, 00128 const void * buffer, 00129 size_t size); 00130 00131 00139 int 00140 SPDYF_openssl_is_pending(struct SPDY_Session *session); 00141 00142 00150 int 00151 SPDYF_openssl_before_write(struct SPDY_Session *session); 00152 00153 00162 int 00163 SPDYF_openssl_after_write(struct SPDY_Session *session, int was_written); 00164 00165 00166 #endif