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

Function GetMaximumSegmentSize

util/network/socket.cpp:353–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353size_t GetMaximumSegmentSize(SOCKET s) {
354#if defined(TCP_MAXSEG)
355 int val;
356
357 if (GetSockOpt(s, IPPROTO_TCP, TCP_MAXSEG, val) == 0) {
358 return (size_t)val;
359 }
360#endif
361
362 /*
363 * probably a good guess...
364 */
365 return 8192;
366}
367
368size_t GetMaximumTransferUnit(SOCKET /*s*/) {
369 // for someone who'll dare to write it

Callers 1

MaximumSegmentSizeMethod · 0.85

Calls 1

GetSockOptFunction · 0.85

Tested by

no test coverage detected