MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / initSettings

Method initSettings

MonaBase/sources/Socket.cpp:474–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472 }
473
474 void initSettings() {
475 Exception ex;
476#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
477 // SIGPIPE sends a signal that if unhandled (which is the default)
478 // will crash the process.
479 //
480 // In order to have sockets behave the same across platforms, it is
481 // best to just ignore SIGPIPE all together.
482
483 setOption(ex,SOL_SOCKET, SO_NOSIGPIPE, 1);
484#endif
485 if (type==Socket::STREAM)
486 setNoDelay(ex,true); // to avoid the nagle algorhytme, ignore error if not possible
487 }
488
489 template<typename Type>
490 Type& getOption(Exception& ex, int level, int option, Type& value) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected