| 110 | |
| 111 | |
| 112 | TContIOStatus ReadVectorD(TCont* cont, SOCKET fd, TContIOVector* vec, TInstant deadline) noexcept { |
| 113 | while (true) { |
| 114 | ssize_t res = DoReadVector(fd, vec); |
| 115 | |
| 116 | if (res >= 0) { |
| 117 | return TContIOStatus::Success((size_t) res); |
| 118 | } |
| 119 | |
| 120 | { |
| 121 | const int err = LastSystemError(); |
| 122 | |
| 123 | if (!IsBlocked(err)) { |
| 124 | return TContIOStatus::Error(err); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | if ((res = PollD(cont, fd, CONT_POLL_READ, deadline)) != 0) { |
| 129 | return TContIOStatus::Error((int) res); |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | TContIOStatus ReadVectorT(TCont* cont, SOCKET fd, TContIOVector* vec, TDuration timeOut) noexcept { |
| 135 | return ReadVectorD(cont, fd, vec, timeOut.ToDeadLine()); |
no test coverage detected