• R/O
  • SSH
  • HTTPS

tidesnet: Commit


Commit MetaInfo

Revision15 (tree)
Time2018-08-11 13:03:41
Authorquiret

Log Message

- added experimental SO_LINGER to all created sockets

Change Summary

Incremental Difference

--- library/src/main.cpp (revision 14)
+++ library/src/main.cpp (revision 15)
@@ -161,7 +161,14 @@
161161 addressFamilyOut = addressFamily;
162162
163163 // Create the Windows kernel network resource.
164- return socket( addressFamily, type, protocol );
164+ SOCKET sysSocket = socket( addressFamily, type, protocol );
165+
166+ LINGER linger;
167+ linger.l_onoff = 1;
168+ linger.l_linger = 30;
169+ setsockopt( sysSocket, SOL_SOCKET, SO_LINGER, (const char*)&linger, sizeof(linger) );
170+
171+ return sysSocket;
165172 }
166173 #endif //_WIN32
167174
Show on old repository browser