MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / checkPacket

Method checkPacket

src/Client/Connection.cpp:1338–1353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1336
1337
1338std::optional<UInt64> Connection::checkPacket(size_t timeout_microseconds)
1339{
1340 if (last_input_packet_type.has_value())
1341 return last_input_packet_type;
1342
1343 if (hasReadPendingData() || poll(timeout_microseconds))
1344 {
1345 UInt64 packet_type = 0;
1346 readVarUInt(packet_type, *in);
1347
1348 last_input_packet_type.emplace(packet_type);
1349 return last_input_packet_type;
1350 }
1351
1352 return {};
1353}
1354
1355
1356UInt64 Connection::receivePacketType()

Callers 3

writeMethod · 0.45
sendDataFromPipeMethod · 0.45

Calls 1

emplaceMethod · 0.45

Tested by

no test coverage detected