mirror of https://github.com/getdnsapi/getdns.git
write() on a socket is equivalent to send() with flag value of 0.
This commit is contained in:
parent
a0c313412d
commit
757becc812
|
@ -808,13 +808,8 @@ stub_tcp_write(int fd, getdns_tcp_state *tcp, getdns_network_req *netreq)
|
||||||
|
|
||||||
/* Coming back from an earlier unfinished write or handshake.
|
/* Coming back from an earlier unfinished write or handshake.
|
||||||
* Try to send remaining data */
|
* Try to send remaining data */
|
||||||
#ifdef USE_WINSOCK
|
|
||||||
written = send(fd, (void *)(tcp->write_buf + tcp->written),
|
written = send(fd, (void *)(tcp->write_buf + tcp->written),
|
||||||
tcp->write_buf_len - tcp->written, 0);
|
tcp->write_buf_len - tcp->written, 0);
|
||||||
#else
|
|
||||||
written = write(fd, tcp->write_buf + tcp->written,
|
|
||||||
tcp->write_buf_len - tcp->written);
|
|
||||||
#endif
|
|
||||||
if (written == -1) {
|
if (written == -1) {
|
||||||
if (_getdns_socketerror() == _getdns_EWOULDBLOCK)
|
if (_getdns_socketerror() == _getdns_EWOULDBLOCK)
|
||||||
return STUB_TCP_WOULDBLOCK;
|
return STUB_TCP_WOULDBLOCK;
|
||||||
|
|
Loading…
Reference in New Issue