| 141 | } |
| 142 | |
| 143 | bool ReadBufferFromPocoSocketBase::poll(size_t timeout_microseconds) |
| 144 | { |
| 145 | /// For secure socket it is important to check if any remaining data available in underlying decryption buffer - |
| 146 | /// read always retrieves the whole encrypted frame from the wire and puts it into underlying buffer while returning only requested size - |
| 147 | /// further poll() can block though there is still data to read in the underlying decryption buffer. |
| 148 | if (available() || socket.impl()->available()) |
| 149 | return true; |
| 150 | |
| 151 | Stopwatch watch; |
| 152 | bool res = socket.impl()->poll(timeout_microseconds, Poco::Net::Socket::SELECT_READ | Poco::Net::Socket::SELECT_ERROR); |
| 153 | ProfileEvents::increment(ProfileEvents::NetworkReceiveElapsedMicroseconds, watch.elapsedMicroseconds()); |
| 154 | return res; |
| 155 | } |
| 156 | |
| 157 | void ReadBufferFromPocoSocketBase::setReceiveTimeout(size_t receive_timeout_microseconds) |
| 158 | { |
nothing calls this directly
no test coverage detected