| 283 | } |
| 284 | |
| 285 | static int tcp_write(URLContext *h, const uint8_t *buf, int size) |
| 286 | { |
| 287 | TCPContext *s = h->priv_data; |
| 288 | int ret; |
| 289 | |
| 290 | if (!(h->flags & AVIO_FLAG_NONBLOCK)) { |
| 291 | ret = ff_network_wait_fd_timeout(s->fd, 1, h->rw_timeout, &h->interrupt_callback); |
| 292 | if (ret) |
| 293 | return ret; |
| 294 | } |
| 295 | ret = send(s->fd, buf, size, MSG_NOSIGNAL); |
| 296 | return ret < 0 ? ff_neterrno() : ret; |
| 297 | } |
| 298 | |
| 299 | static int tcp_shutdown(URLContext *h, int flags) |
| 300 | { |
nothing calls this directly
no test coverage detected