30 #include <netinet/tcp.h>
69 fd_flags = fcntl (session->
socket_fd, F_GETFL);
71 || 0 != fcntl (session->
socket_fd, F_SETFL, fd_flags | O_NONBLOCK))
72 SPDYF_DEBUG(
"WARNING: Couldn't set the new connection to be non-blocking");
76 ret = setsockopt(session->
socket_fd, IPPROTO_TCP, TCP_NODELAY, &val, (socklen_t)
sizeof(val));
78 SPDYF_DEBUG(
"WARNING: Couldn't set the new connection to TCP_NODELAY");
106 #if EAGAIN != EWOULDBLOCK
135 #if EAGAIN != EWOULDBLOCK
162 #if HAVE_DECL_TCP_CORK
168 ret = setsockopt(session->
socket_fd, IPPROTO_TCP, TCP_CORK, &val, (socklen_t)
sizeof(val));
170 SPDYF_DEBUG(
"WARNING: Couldn't set the new connection to TCP_CORK");
181 #if HAVE_DECL_TCP_CORK
187 ret = setsockopt(session->
socket_fd, IPPROTO_TCP, TCP_CORK, &val, (socklen_t)
sizeof(val));
189 SPDYF_DEBUG(
"WARNING: Couldn't unset the new connection to TCP_CORK");
void SPDYF_raw_close_session(struct SPDY_Session *session)
struct SPDY_Daemon * daemon
int SPDYF_raw_is_pending(struct SPDY_Session *session)
int SPDYF_raw_init(struct SPDY_Daemon *daemon)
TCP connection/SPDY session handling.
void SPDYF_raw_deinit(struct SPDY_Daemon *daemon)
internal functions and macros for the framing layer
int SPDYF_raw_new_session(struct SPDY_Session *session)
int SPDYF_raw_send(struct SPDY_Session *session, const void *buffer, size_t size)
#define SPDYF_DEBUG(fmt,...)
int SPDYF_raw_before_write(struct SPDY_Session *session)
void SPDYF_raw_global_init()
void SPDYF_raw_global_deinit()
enum SPDY_DAEMON_FLAG flags
int SPDYF_raw_after_write(struct SPDY_Session *session, int was_written)
int SPDYF_raw_recv(struct SPDY_Session *session, void *buffer, size_t size)