svn rev #21990: tools/gssmonger/trunk/gssmaggot/
raeburn@MIT.EDU
raeburn at MIT.EDU
Thu Feb 12 19:53:15 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21990
Commit By: raeburn
Log Message:
set some socket options
Changed Files:
U tools/gssmonger/trunk/gssmaggot/netrw.c
U tools/gssmonger/trunk/gssmaggot/netutil.c
Modified: tools/gssmonger/trunk/gssmaggot/netrw.c
===================================================================
--- tools/gssmonger/trunk/gssmaggot/netrw.c 2009-02-13 00:52:00 UTC (rev 21989)
+++ tools/gssmonger/trunk/gssmaggot/netrw.c 2009-02-13 00:53:15 UTC (rev 21990)
@@ -116,6 +116,20 @@
#define PF_NAME(x) ((x) == PF_INET ? "INET" : ((x) == PF_INET6 ? "INET6" : "Unknown"))
+int
+setnolinger(SOCKET s)
+{
+ static const struct linger ling = { 0, 0 };
+ return setsockopt(s, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling));
+}
+#include <netinet/tcp.h>
+int
+setnodelay(SOCKET s)
+{
+ static const int one = 1;
+ return setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
+}
+
/*++**************************************************************
NAME: MakeSocket
@@ -173,6 +187,8 @@
pAddrFamily );
}
else {
+ setnolinger(*pSocket);
+ setnodelay(*pSocket);
return TRUE;
}
}
@@ -193,6 +209,8 @@
PF_NAME(pAddrIn->ai_family));
}
else {
+ setnolinger(*pSocket);
+ setnodelay(*pSocket);
return TRUE;
}
}
Modified: tools/gssmonger/trunk/gssmaggot/netutil.c
===================================================================
--- tools/gssmonger/trunk/gssmaggot/netutil.c 2009-02-13 00:52:00 UTC (rev 21989)
+++ tools/gssmonger/trunk/gssmaggot/netutil.c 2009-02-13 00:53:15 UTC (rev 21990)
@@ -925,6 +925,8 @@
} else {
*pSession = SessionSock;
+ setnodelay(SessionSock);
+ setnolinger(SessionSock);
}
More information about the cvs-krb5
mailing list