On 13.02.2012 19:25, Eliot Miranda wrote:


On Sun, Feb 12, 2012 at 11:59 PM, Philippe Marschall
<philippe.marsch...@netcetera.ch
<mailto:philippe.marsch...@netcetera.ch>> wrote:

    On 02/13/2012 12:08 AM, Eliot Miranda wrote:





        Hi Phillipe,

             you'll need to add TCP_CORK to the list of known options in
        platforms/unix/plugins/__SocketPlugin/sqUnixSocket.c


    Do you accept patches?


With gratitude :)

There you go, has also TCP_NOPUSH for Mac OS (no, I didn't actually test that).

Cheers
Philippe
Index: platforms/Mac OS/plugins/SocketPlugin/sqMacNetwork.c
===================================================================
--- platforms/Mac OS/plugins/SocketPlugin/sqMacNetwork.c	(Revision 2531)
+++ platforms/Mac OS/plugins/SocketPlugin/sqMacNetwork.c	(Arbeitskopie)
@@ -2410,6 +2410,9 @@
 static SInt32	lookupOptionName(EPInfo *epi, Boolean trueIfGet, char *aString, UInt32 value, SInt32 *result) {
 	if (strcmp("TCP_MAXSEG",aString)==0) 				{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_MAXSEG,value,result);};
 	if (strcmp("TCP_NODELAY",aString)==0) 				{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_NODELAY,value,result);};
+#ifdef TCP_NOPUSH
+	if (strcmp("TCP_NOPUSH",aString)==0) 				{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_NOPUSH,value,result);};
+#endif
 	if (strcmp("TCP_ABORT_THRESHOLD",aString)==0) 		{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_ABORT_THRESHOLD,value,result);};
 	if (strcmp("TCP_CONN_NOTIFY_THRESHOLD",aString)==0) {return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_CONN_NOTIFY_THRESHOLD,value,result);};
 	if (strcmp("TCP_CONN_ABORT_THRESHOLD",aString)==0) 	{return SetFourByteOption(epi,trueIfGet,INET_TCP,TCP_CONN_ABORT_THRESHOLD,value,result);};
Index: platforms/unix/plugins/SocketPlugin/sqUnixSocket.c
===================================================================
--- platforms/unix/plugins/SocketPlugin/sqUnixSocket.c	(Revision 2531)
+++ platforms/unix/plugins/SocketPlugin/sqUnixSocket.c	(Arbeitskopie)
@@ -1243,6 +1243,9 @@
 #endif
   { "TCP_MAXSEG",			SOL_TCP,	TCP_MAXSEG },
   { "TCP_NODELAY",			SOL_TCP,	TCP_NODELAY },
+#ifdef TCP_CORK
+  { "TCP_CORK",		        SOL_TCP,	TCP_CORK },
+#endif
 #ifdef SO_REUSEPORT
   { "SO_REUSEPORT",			SOL_SOCKET,	SO_REUSEPORT },
 #endif

Reply via email to