| 34 | } |
| 35 | |
| 36 | bool PacketEndpoint::tryReceivePacket(IMySQLReadPacket & packet, UInt64 millisecond) |
| 37 | { |
| 38 | if (millisecond != 0) |
| 39 | { |
| 40 | ReadBufferFromPocoSocket * socket_in = typeid_cast<ReadBufferFromPocoSocket *>(in); |
| 41 | |
| 42 | if (!socket_in) |
| 43 | throw Exception(ErrorCodes::LOGICAL_ERROR, "LOGICAL ERROR: Attempt to pull the duration in a non socket stream"); |
| 44 | |
| 45 | if (!socket_in->poll(millisecond * 1000)) |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | packet.readPayload(*in, sequence_id); |
| 50 | return true; |
| 51 | } |
| 52 | |
| 53 | void PacketEndpoint::resetSequenceId() |
| 54 | { |
no test coverage detected