aboutsummaryrefslogtreecommitdiff
path: root/src/examples/mhd2spdy_spdy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/mhd2spdy_spdy.h')
-rw-r--r--src/examples/mhd2spdy_spdy.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/examples/mhd2spdy_spdy.h b/src/examples/mhd2spdy_spdy.h
new file mode 100644
index 00000000..e9568ea8
--- /dev/null
+++ b/src/examples/mhd2spdy_spdy.h
@@ -0,0 +1,67 @@
1/*
2 Copyright (C) 2013 Andrey Uzunov
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18/**
19 * @file spdy.h
20 * @author Andrey Uzunov
21 */
22
23#ifndef SPDY_H
24#define SPDY_H
25
26#include "mhd2spdy_structures.h"
27
28struct SPDY_Connection * spdy_connect(const struct URI *uri, uint16_t port, bool is_tls);
29
30void spdy_ctl_poll(struct pollfd *pollfd, struct SPDY_Connection *connection);
31
32bool spdy_ctl_select(fd_set * read_fd_set,
33 fd_set * write_fd_set,
34 fd_set * except_fd_set,
35 struct SPDY_Connection *connection);
36
37int spdy_exec_io(struct SPDY_Connection *connection);
38
39void spdy_diec(const char *func, int error_code);
40
41int
42spdy_request(const char **nv, struct Proxy *proxy);
43
44void spdy_ssl_init_ssl_ctx(SSL_CTX *ssl_ctx, uint16_t *spdy_proto_version);
45
46void
47spdy_free_connection(struct SPDY_Connection * connection);
48
49void
50spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], int max_size, nfds_t *real_size);
51
52
53int
54spdy_get_selectfdset(fd_set * read_fd_set,
55 fd_set * write_fd_set,
56 fd_set * except_fd_set,
57 struct SPDY_Connection *connections[], int max_size, nfds_t *real_size);
58
59void
60spdy_run(struct pollfd fds[], struct SPDY_Connection *connections[], int size);
61
62void
63spdy_run_select(fd_set * read_fd_set,
64 fd_set * write_fd_set,
65 fd_set * except_fd_set, struct SPDY_Connection *connections[], int size);
66
67#endif