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

Method setLinger

MonaBase/sources/Socket.cpp:49–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 bool getOOBInline(Exception& ex) const { return getOption(ex, SOL_SOCKET, SO_OOBINLINE) != 0; }
48
49 void setLinger(Exception& ex,bool on, int seconds) {
50 struct linger l;
51 l.l_onoff = on ? 1 : 0;
52 l.l_linger = seconds;
53 setOption<struct linger>(ex,SOL_SOCKET, SO_LINGER, l);
54 }
55 bool getLinger(Exception& ex, int& seconds) const {
56 struct linger l;
57 getOption<struct linger>(ex, SOL_SOCKET, SO_LINGER, l);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected