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

Function CreateSocketsOnRandomPort

library/cpp/neh/udp.cpp:353–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351 }
352
353 static inline void CreateSocketsOnRandomPort(TSockets& s) {
354 while (true) {
355 try {
356 TSockets tmp;
357
358 CreateSockets(tmp, 5000 + (RandomNumber<ui16>() % 1000));
359 tmp.swap(s);
360
361 return;
362 } catch (const TBindError&) {
363 }
364 }
365 }
366
367 typedef ui64 TTimeStamp;
368

Callers 1

TProtosMethod · 0.85

Calls 2

CreateSocketsFunction · 0.85
swapMethod · 0.45

Tested by

no test coverage detected