mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-18 09:23:53 +00:00
commit
cb811a1e0c
5
NEWS
5
NEWS
@ -3,7 +3,10 @@
|
|||||||
|
|
||||||
* Fixed #1673 - CMake on Windows put PDB in wrong directory.
|
* Fixed #1673 - CMake on Windows put PDB in wrong directory.
|
||||||
|
|
||||||
* Fixed #1723 - Family is not set when resolving NIC on android.
|
* Fixed #1723 - Family is not set when resolving NIC on Android.
|
||||||
|
|
||||||
|
* Fixed #1608 - Windows 7 TCP slow start issue.
|
||||||
|
|
||||||
|
|
||||||
0MQ version 4.1.4 stable, released on 2015/12/18
|
0MQ version 4.1.4 stable, released on 2015/12/18
|
||||||
================================================
|
================================================
|
||||||
|
@ -454,6 +454,27 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
|
|||||||
if (rc != SOCKET_ERROR)
|
if (rc != SOCKET_ERROR)
|
||||||
*r_ = accept (listener, NULL, NULL);
|
*r_ = accept (listener, NULL, NULL);
|
||||||
|
|
||||||
|
// Send/receive large chunk to work around TCP slow start
|
||||||
|
// This code is a workaround for #1608
|
||||||
|
if (*r_ != INVALID_SOCKET) {
|
||||||
|
size_t dummy_size = 1024 * 1024; // 1M to overload default receive buffer
|
||||||
|
unsigned char *dummy = (unsigned char *) malloc (dummy_size);
|
||||||
|
int still_to_send = (int) dummy_size;
|
||||||
|
int still_to_recv = (int) dummy_size;
|
||||||
|
while (still_to_send || still_to_recv) {
|
||||||
|
int nbytes;
|
||||||
|
if (still_to_send > 0) {
|
||||||
|
nbytes = ::send (*w_, (char *) (dummy + dummy_size - still_to_send), still_to_send, 0);
|
||||||
|
wsa_assert (nbytes != SOCKET_ERROR);
|
||||||
|
still_to_send -= nbytes;
|
||||||
|
}
|
||||||
|
nbytes = ::recv (*r_, (char *) (dummy + dummy_size - still_to_recv), still_to_recv, 0);
|
||||||
|
wsa_assert (nbytes != SOCKET_ERROR);
|
||||||
|
still_to_recv -= nbytes;
|
||||||
|
}
|
||||||
|
free (dummy);
|
||||||
|
}
|
||||||
|
|
||||||
// Save errno if error occurred in bind/listen/connect/accept.
|
// Save errno if error occurred in bind/listen/connect/accept.
|
||||||
int saved_errno = 0;
|
int saved_errno = 0;
|
||||||
if (*r_ == INVALID_SOCKET)
|
if (*r_ == INVALID_SOCKET)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user