aboutsummaryrefslogtreecommitdiff
path: root/src/examples/spdy_event_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/spdy_event_loop.c')
-rw-r--r--src/examples/spdy_event_loop.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/examples/spdy_event_loop.c b/src/examples/spdy_event_loop.c
index 6caea07a..e5bac293 100644
--- a/src/examples/spdy_event_loop.c
+++ b/src/examples/spdy_event_loop.c
@@ -35,7 +35,9 @@
35#include "microspdy.h" 35#include "microspdy.h"
36#include <sys/time.h> 36#include <sys/time.h>
37#include <time.h> 37#include <time.h>
38#ifndef MINGW
38#include <arpa/inet.h> 39#include <arpa/inet.h>
40#endif
39//#include "../framinglayer/structures.h" 41//#include "../framinglayer/structures.h"
40//#include "../applicationlayer/alstructures.h" 42//#include "../applicationlayer/alstructures.h"
41 43
@@ -259,8 +261,10 @@ main (int argc, char *const *argv)
259{ 261{
260 if(argc != 2) return 1; 262 if(argc != 2) return 1;
261 263
262 if (signal(SIGPIPE, sig_handler) == SIG_ERR) 264 #ifndef MINGW
263 printf("\ncan't catch SIGPIPE\n"); 265 if (signal(SIGPIPE, sig_handler) == SIG_ERR)
266 printf("\ncan't catch SIGPIPE\n");
267 #endif
264 268
265 SPDY_init(); 269 SPDY_init();
266 270
@@ -272,8 +276,8 @@ main (int argc, char *const *argv)
272 addr4.sin_port = htons(atoi(argv[1])); 276 addr4.sin_port = htons(atoi(argv[1]));
273 277
274 struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]), 278 struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]),
275 DATADIR "cert-and-key.pem", 279 DATA_DIR "cert-and-key.pem",
276 DATADIR "cert-and-key.pem", 280 DATA_DIR "cert-and-key.pem",
277 &new_session_callback,&session_closed_handler,&standard_request_handler,NULL,NULL, 281 &new_session_callback,&session_closed_handler,&standard_request_handler,NULL,NULL,
278 SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 10, 282 SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 10,
279 //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr4, 283 //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr4,
@@ -290,8 +294,8 @@ main (int argc, char *const *argv)
290 addr6.sin6_port = htons(atoi(argv[1]) + 1); 294 addr6.sin6_port = htons(atoi(argv[1]) + 1);
291 295
292 struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1, 296 struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1,
293 DATADIR "cert-and-key.pem", 297 DATA_DIR "cert-and-key.pem",
294 DATADIR "cert-and-key.pem", 298 DATA_DIR "cert-and-key.pem",
295 &new_session_callback,NULL,&standard_request_handler,NULL,&main, 299 &new_session_callback,NULL,&standard_request_handler,NULL,&main,
296 //SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 0, 300 //SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 0,
297 //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr6, 301 //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr6,