libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit fc73de2bc9583ba2d30691d62b60ee87fe8fb26a
parent c1a7d6e2b5aa34bb8bf860471083e8757d0efcbd
Author: Andrey Uzunov <andrey.uzunov@gmail.com>
Date:   Fri,  5 Jul 2013 16:54:29 +0000

spdy: non blockable sockets for the raw IO

Diffstat:
Msrc/microspdy/io_raw.c | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/microspdy/io_raw.c b/src/microspdy/io_raw.c @@ -59,20 +59,15 @@ SPDYF_raw_deinit(struct SPDY_Daemon *daemon) int SPDYF_raw_new_session(struct SPDY_Session *session) { - (void)session; + int fd_flags; - //TODO //setting the socket to be non-blocking - /* - * different handling is needed by libssl if non-blocking is used - * - fd_flags = fcntl (new_socket_fd, F_GETFL); + fd_flags = fcntl (session->socket_fd, F_GETFL); if ( -1 == fd_flags - || 0 != fcntl (new_socket_fd, F_SETFL, fd_flags | O_NONBLOCK)) + || 0 != fcntl (session->socket_fd, F_SETFL, fd_flags | O_NONBLOCK)) { SPDYF_DEBUG("WARNING: Couldn't set the new connection to be non-blocking"); } - */ return SPDY_YES; }