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

Method TestSock

util/network/socket_ut.cpp:42–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40UNIT_TEST_SUITE_REGISTRATION(TSockTest);
41
42void TSockTest::TestSock() {
43 TNetworkAddress addr("yandex.ru", 80);
44 TSocket s(addr);
45 TSocketOutput so(s);
46 TSocketInput si(s);
47 const TStringBuf req = "GET / HTTP/1.1\r\nHost: yandex.ru\r\n\r\n";
48
49 so.Write(req.data(), req.size());
50
51 UNIT_ASSERT(!si.ReadLine().empty());
52}
53
54void TSockTest::TestTimeout() {
55 static const int timeout = 1000;

Callers

nothing calls this directly

Calls 5

WriteMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
ReadLineMethod · 0.45

Tested by

no test coverage detected