MCPcopy Create free account
hub / github.com/catboost/catboost / SetSocketToS

Function SetSocketToS

util/network/socket.cpp:404–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void SetSocketToS(SOCKET s, const NAddr::IRemoteAddr* addr, int tos) {
405 switch (addr->Addr()->sa_family) {
406 case AF_INET:
407 CheckedSetSockOpt(s, IPPROTO_IP, IP_TOS, tos, "tos");
408 return;
409
410 case AF_INET6:
411#ifdef IPV6_TCLASS
412 CheckedSetSockOpt(s, IPPROTO_IPV6, IPV6_TCLASS, tos, "tos");
413 return;
414#endif
415 break;
416 }
417
418 ythrow yexception() << "SetSocketToS unsupported for family " << addr->Addr()->sa_family;
419}
420
421void SetSocketToS(SOCKET s, int tos) {
422 TOpaqueAddr addr;

Callers

nothing calls this directly

Calls 4

CheckedSetSockOptFunction · 0.85
MutableAddrMethod · 0.80
LenPtrMethod · 0.80
AddrMethod · 0.45

Tested by

no test coverage detected