00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00025 #ifndef IO_H
00026 #define IO_H
00027
00028 #include "platform.h"
00029 #include "io_openssl.h"
00030 #include "io_raw.h"
00031
00032
00036 enum SPDY_IO_ERROR
00037 {
00041 SPDY_IO_ERROR_CLOSED = 0,
00042
00046 SPDY_IO_ERROR_ERROR = -2,
00047
00054 SPDY_IO_ERROR_AGAIN = -3,
00055 };
00056
00057
00062 typedef void
00063 (*SPDYF_IOGlobalInit) ();
00064
00065
00071 typedef void
00072 (*SPDYF_IOGlobalDeinit) ();
00073
00074
00083 typedef int
00084 (*SPDYF_IOInit) (struct SPDY_Daemon *daemon);
00085
00086
00093 typedef void
00094 (*SPDYF_IODeinit) (struct SPDY_Daemon *daemon);
00095
00096
00104 typedef int
00105 (*SPDYF_IONewSession) (struct SPDY_Session *session);
00106
00107
00114 typedef void
00115 (*SPDYF_IOCloseSession) (struct SPDY_Session *session);
00116
00117
00129 typedef int
00130 (*SPDYF_IORecv) (struct SPDY_Session *session,
00131 void * buffer,
00132 size_t size);
00133
00134
00147 typedef int
00148 (*SPDYF_IOSend) (struct SPDY_Session *session,
00149 const void * buffer,
00150 size_t size);
00151
00152
00161 typedef int
00162 (*SPDYF_IOIsPending) (struct SPDY_Session *session);
00163
00164
00173 typedef int
00174 (*SPDYF_IOBeforeWrite) (struct SPDY_Session *session);
00175
00176
00186 typedef int
00187 (*SPDYF_IOAfterWrite) (struct SPDY_Session *session,
00188 int was_written);
00189
00190
00199 int
00200 SPDYF_io_set_daemon(struct SPDY_Daemon *daemon,
00201 enum SPDY_IO_SUBSYSTEM io_subsystem);
00202
00203
00212 int
00213 SPDYF_io_set_session(struct SPDY_Session *session,
00214 enum SPDY_IO_SUBSYSTEM io_subsystem);
00215
00216 #endif