|
@@ -86,7 +86,7 @@ void set_defaultparse(int (*defaultparse)(int))
|
|
void set_nonblocking(int fd, int yes) {
|
|
void set_nonblocking(int fd, int yes) {
|
|
// I don't think we need this
|
|
// I don't think we need this
|
|
// TCP_NODELAY BOOL Disables the Nagle algorithm for send coalescing.
|
|
// TCP_NODELAY BOOL Disables the Nagle algorithm for send coalescing.
|
|
- //setsockopt(sock,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof yes);
|
|
|
|
|
|
+ setsockopt(fd,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof yes);
|
|
|
|
|
|
// FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s.
|
|
// FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s.
|
|
// The argp parameter is zero if nonblocking is to be disabled.
|
|
// The argp parameter is zero if nonblocking is to be disabled.
|
|
@@ -109,9 +109,9 @@ static void setsocketopts(int fd)
|
|
setsockopt(fd,SOL_SOCKET,SO_REUSEPORT,(char *)&yes,sizeof(yes));
|
|
setsockopt(fd,SOL_SOCKET,SO_REUSEPORT,(char *)&yes,sizeof(yes));
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
-// setsockopt(sock,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof(yes));
|
|
|
|
-// setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *) &wfifo_size , sizeof(rfifo_size ));
|
|
|
|
-// setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *) &rfifo_size , sizeof(rfifo_size ));
|
|
|
|
|
|
+ setsockopt(fd,IPPROTO_TCP,TCP_NODELAY,(char *)&yes,sizeof(yes));
|
|
|
|
+// setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *) &wfifo_size , sizeof(rfifo_size ));
|
|
|
|
+// setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *) &rfifo_size , sizeof(rfifo_size ));
|
|
#ifdef __WIN32
|
|
#ifdef __WIN32
|
|
{ //set SO_LINGER option (from Freya)
|
|
{ //set SO_LINGER option (from Freya)
|
|
//(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/closesocket_2.asp)
|
|
//(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/closesocket_2.asp)
|