| 152 | } |
| 153 | |
| 154 | bool Socket::WaitWriteable(struct timeval* tv, bool restart) |
| 155 | { |
| 156 | for (;;) |
| 157 | { |
| 158 | int n = Socket_PollWriteable(Handle(), tv); |
| 159 | if (n != SOCKET_ERROR_RETURN) |
| 160 | { |
| 161 | return n > 0; |
| 162 | } |
| 163 | else if (!IsInterruptedAndRestart(restart)) |
| 164 | { |
| 165 | CheckError(n, "WaitWriteable"); |
| 166 | break; |
| 167 | } |
| 168 | } |
| 169 | return false; |
| 170 | } |
| 171 | |
| 172 | bool Socket::CheckError(int result, const char* info) const |
| 173 | { |