0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-02 19:35:29 +08:00

2015 Commits

Author SHA1 Message Date
Pieter Hintjens
b49a60410a Problem: use of libsodium vs. tweetnacl is confused
It's unclear which we need and in the source code, conditional code
treats tweetnacl as a subclass of libsodium, which is inaccurate.

Solution: redesign the configure/cmake API for this:

* tweetnacl is present by default and cannot be enabled
* libsodium can be enabled using --with-libsodium, which replaces
  the built-in tweetnacl
* CURVE encryption can be disabled entirely using --enable-curve=no

The macros we define in platform.hpp are:

    ZMQ_HAVE_CURVE    1        //  When CURVE is enabled
    HAVE_LIBSODIUM    1        //  When we are using libsodium
    HAVE_TWEETNACL    1        //  When we're using tweetnacl (default)

As of this patch, the default build of libzmq always has CURVE
security, and always uses tweetnacl.
2016-02-11 13:32:01 +01:00
Pieter Hintjens
62c66ae7f7 Problem: test_large_msg kills my system temporarily
And I'm on a reasonably sized laptop. I think allocating INT_MAX
memory is dangerous in a test case.

Solution: expose this as a context option. I've used ZMQ_MAX_MSGSZ
and documented it and implemented the API. However I don't know how
to get the parent context for a socket, so the code in zmq.cpp is
still unfinished.
2016-02-09 10:55:09 +01:00
Pieter Hintjens
7470c00d4d Problem: ZMQ_TCP_RECV_BUFFER/SEND_BUFFER are redundant
These options are confusing and redundant. Their names suggest
they apply to the tcp:// transport, yet they are used for all
stream protocols. The methods zmq::set_tcp_receive_buffer and
zmq::set_tcp_send_buffer don't use these values at all, they use
ZMQ_SNDBUF and ZMQ_RCVBUF.

Solution: merge these new options into ZMQ_SNDBUF and ZMQ_RCVBUF.

This means defaulting these two options to 8192, and removing the
new options. We now have ZMQ_SNDBUF and ZMQ_RCVBUF being used both
for TCP socket control, and for input/output buffering.

Note: the default for SNDBUF and RCVBUF are otherwise 4096.
2016-02-09 10:53:52 +01:00
Pieter Hintjens
7f6ed167fc Problem: ZMQ_XPUB_VERBOSE_UNSUBSCRIBE is clumsy
This option has a few issues. The name is long and clumsy. The
functonality is not smooth: one must set both this and
ZMQ_XPUB_VERBOSE at the same time, or things will break mysteriously.

Solution: rename to ZMQ_XPUB_VERBOSER and make an atomic option.

That is, implicitly does ZMQ_XPUB_VERBOSE.
2016-02-09 10:53:52 +01:00
Pieter Hintjens
da8ce55a14 Problem: ZMQ_TCP_RETRANSMIT_TIMEOUT is a clumsy name
Solution: rename to ZMQ_MAXRT

This is the option name used on Windows, so easier to use and
remember.
2016-02-09 10:53:52 +01:00
Luca Boccassi
edc4ee03e8 Problem: ZMQ_USEFD does not follow conventions
Solution: rename socket option (and variables and files) from usefd
to use_fd.
2016-02-09 09:36:14 +00:00
Luca Boccassi
c158178798 Problem: ZMQ_PRE_ALLOCATED_FD is too long
Solution: rename socket option (and variables and files) from
pre_allocated_fd to usefd.
2016-02-08 22:46:34 +00:00
Pieter Hintjens
58059939fc Problem: compile warnings on Windows in new radio/dish code
Solution: fix these.
2016-02-07 12:27:23 +01:00
Pieter Hintjens
07cba2307d Merge pull request #1779 from obache/neatsrc/fix-a-typo-for-ZMTP-heartbeats
Fix a typo in "Add ZMTP heartbeats" changes
2016-02-07 10:31:33 +01:00
Pieter Hintjens
8a1dcca8c2 Merge pull request #1778 from obache/neatsrc/fix1768
Change to detect POSIX Thread priority support properly
2016-02-07 10:31:19 +01:00
OBATA Akio
99495bbab8 Fix a typo in "Add ZMTP heartbeats" changes 2016-02-07 17:09:19 +09:00
OBATA Akio
7cd60fae59 Change to detect POSIX Thread priority support properly 2016-02-07 16:43:46 +09:00
Brian Silverman
273b54715e Use memcpy instead of assuming option values are aligned
Otherwise, it's undefined behavior. ubsan catches alignment issues in
the libzmq test suite without this.
2016-02-06 22:22:51 -05:00
Pieter Hintjens
a1f51b695f Problem: unclear rules for passing null arguments
Solution: be more explicit in the code, and in the zmq_recv man
page (which is the most unobvious case). Assert if length is not
zero and buffer is nonetheless null.
2016-02-06 14:13:13 +01:00
Pieter Hintjens
27a8961c37 Problem: resolution of int optval_ was made more verbose
There's no value in this as the same pattern is repeated in several
places and it's fair to expect people to understand it.

Solution: revert to the old, one-liner style.
2016-02-06 14:12:43 +01:00
Pieter Hintjens
39563d70c5 Merge pull request #1775 from CommanderBubble/patch-2
updates for bumped _WIN32_WINNT version with mingw builds
2016-02-06 13:56:45 +01:00
Michael
56efddd182 remove c++11 requirement and -Werror=sign-compare
used static_cast<signed int> around WSA_WAIT_FAILED as it is an unsigned implicitly defined as (0xFFFFFFFF ion winbase.h) and causes a comparison error.

removed use of c++11 style initialiser list for 'sockaddr addr { 0 }' and changed it to 'sockaddr addr = { 0 }'
2016-02-06 22:55:24 +11:00
Michael
988d33bcf8 added windows.hpp with include check
includes windows.hpp if on windows build for mingw build errors from including zmq.h before windows.h
2016-02-06 22:39:53 +11:00
Michael
f472893da1 changed order of includes 2016-02-06 22:37:45 +11:00
Michael
3cdc9218c2 remove include that is already in header 2016-02-06 22:36:37 +11:00
Michael
def0336e9a increase mingw's minimum _WIN32_WINNT version 2016-02-06 22:26:50 +11:00
Brian Silverman
f4fe375bd1 Don't call memcpy with 0 size and NULL pointer(s)
It's undefined behavior, and ubsan flags it.
2016-02-05 14:04:22 -05:00
Luca Boccassi
a9aeb492dc Problem: Valgrind reports read of freed memory
Solution: when iterating over a map and conditionally deleting
elements, an erased iterator gets invalidated. Call erase using postfix
increment on iterator to avoid using an invalid element in the next
iteration.
2016-02-04 22:21:29 +00:00
Luca Boccassi
84ad4bf0ff Problem: cannot use new pre-allocated FD with TCP
Solution: parse the value set by the ZMQ_PRE_ALLOCATED_FD sockopt
when creating a new TCP socket and use it if valid.
Add new tests/test_pre_allocated_fd_tcp.cpp unit test.
2016-02-04 16:57:26 +00:00
Luca Boccassi
9b885b7c00 Problem: cannot use new pre-allocated FD with IPC
Solution: parse the value set by the ZMQ_PRE_ALLOCATED_FD sockopt
when creating a new IPC socket and use it if valid.
Add new tests/test_pre_allocated_fd_ipc.cpp unit test.
2016-02-04 16:57:26 +00:00
Luca Boccassi
4bcbb3055e Problem: cannot use pre-allocated FDs. Fixes #777
Solution: add new [set|get]sockopt ZMQ_PRE_ALLOCATED_FD to allow
users to let ZMQ use a pre-allocated file descriptor instead of
allocating a new one. Update [set|get]sockopt documentation and
test accordingly.

The main use case for this feature is a socket-activated systemd
service. For more information about this feature see:
http://0pointer.de/blog/projects/socket-activation.html
2016-02-04 16:57:26 +00:00
Pieter Hintjens
3d9984efe2 Merge pull request #1764 from GreatFruitOmsk/master
Make VMCI work on Windows
2016-02-03 16:21:53 +01:00
Ilya Kulakov
538e5d4742 Make VMCI to work on Windows.
select was improved to support multiple service providers on Windows.
it should be slightly faster because of optimized iteration
over selected sockets.
2016-02-03 19:12:11 +06:00
Pieter Hintjens
b92055fa56 Problem: not building on VS2015
Solution: fixed project files, and warning in timers.cpp
2016-02-02 22:05:56 +01:00
Pieter Hintjens
44c6b0484e Revert "Revert "Problem: deprecated use and reference of zmq_term"" 2016-02-01 23:00:06 +01:00
Pieter Hintjens
1708bfefb7 Revert "Problem: deprecated use and reference of zmq_term" 2016-02-01 22:41:51 +01:00
Joe Eli McIlvain
d44a8ccddb Merge pull request #1756 from c-rack/replace-zmq-term
Problem: deprecated use and reference of `zmq_term`
2016-02-01 13:35:33 -08:00
Constantin Rack
589464ced9 Problem: comments still refer to deprecated zmq_term.
Solution: replace with `zmq_ctx_term`

Also fix whitespace (tabs instead of spaces)
2016-02-01 21:51:54 +01:00
Usama Mehboob
a72cb5d43d added #include<unistd.h> in udp_engine.cpp to solve error 'close was not declared in scope' 2016-02-02 01:17:12 +05:00
Constantin Rack
7da3ee138e Problem: deprecated zmq_utils.h is still included
Solution: remove all remaining references to `zmq_utils.h`
2016-02-01 11:34:36 +01:00
Pieter Hintjens
6f94af8cca Problem: various errors in build scripts
- zmq_utils.h was removed
- udp_address.cpp and udp_engine.cpp were added

Solution: patch all affected build scripts
2016-02-01 11:18:08 +01:00
Constantin Rack
8dbda15e21 Merge pull request #1745 from somdoron/master 2016-01-30 22:23:35 +01:00
Min RK
cdec4dc9ee allow underscores in domain names
Since they are allowed

(They are not, however, allowed in hostnames)
2016-01-30 21:30:30 +01:00
somdoron
389e853c6d Fix compilation errors on windows 2016-01-30 13:29:41 +02:00
Doron Somech
add4e7675f Merge pull request #1744 from jcfr/fix-gcc-warnings
Fix unused-parameter/unused-but-set-variable/missing-field-initializers warnings
2016-01-30 09:08:09 +01:00
Jean-Christophe Fillion-Robin
2cb8da3bfd Style: Fix -Wmissing-field-initializers in socket_poller.cpp
This commit addresses the following warnings reported on gcc 5.2.1. In
the future, this will help reduce the "noise" and help catch warnings
revealing a serious problem.

It was originally introduce in the refactoring associated with
zeromq/libzmq@da2bc60 (Removing zmq_pollfd as it is replaced by zmq_poller).

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
/path/to/libzmq/src/socket_poller.cpp: In member function ‘int zmq::socket_poller_t::add(zmq::socket_base_t*, void*, short int)’:
/path/to/libzmq/src/socket_poller.cpp:92:51: warning: missing initializer for member ‘zmq::socket_poller_t::item_t::pollfd_index’ [-Wmissing-field-initializers]
     item_t item = {socket_, 0, user_data_, events_};
                                                   ^
/path/to/libzmq/src/socket_poller.cpp: In member function ‘int zmq::socket_poller_t::add_fd(zmq::fd_t, void*, short int)’:
/path/to/libzmq/src/socket_poller.cpp:108:50: warning: missing initializer for member ‘zmq::socket_poller_t::item_t::pollfd_index’ [-Wmissing-field-initializers]
     item_t item = {NULL, fd_, user_data_, events_};
                                                  ^
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 02:56:03 -05:00
Jean-Christophe Fillion-Robin
f329252dcb Style: Fix unused parameter compilation warnings
This commit addresses the following warnings reported on gcc 5.2.1. In
the future, this will help reduce the "noise" and help catch warnings
revealing a serious problem.

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
/path/to/libzmq/src/options.cpp:1048:36: warning: unused parameter ‘option_’ [-Wunused-parameter]
 bool zmq::options_t::is_valid (int option_) const
                                    ^

/path/to/libzmq/src/plain_client.cpp:146:30: warning: unused parameter ‘cmd_data’ [-Wunused-parameter]
         const unsigned char *cmd_data, size_t data_size)
                              ^

/path/to/libzmq/src/plain_client.cpp:146:30: warning: unused parameter ‘cmd_data’ [-Wunused-parameter]
         const unsigned char *cmd_data, size_t data_size)
                              ^

/path/to/libzmq/src/socket_base.cpp:1445:44: warning: unused parameter ‘group_’ [-Wunused-parameter]
 int zmq::socket_base_t::xjoin (const char *group_)
                                            ^
/path/to/libzmq/src/socket_base.cpp:1451:45: warning: unused parameter ‘group_’ [-Wunused-parameter]
 int zmq::socket_base_t::xleave (const char *group_)
                                             ^

/path/to/libzmq/src/radio.cpp:145:33: warning: unused parameter ‘msg_’ [-Wunused-parameter]
 int zmq::radio_t::xrecv (msg_t *msg_)
                                 ^
/path/to/libzmq/src/dish.cpp:164:32: warning: unused parameter ‘msg_’ [-Wunused-parameter]
 int zmq::dish_t::xsend (msg_t *msg_)
                                ^

/path/to/libzmq/tests/test_msg_ffn.cpp:32:16: warning: unused parameter ‘data’ [-Wunused-parameter]
 void ffn(void *data, void *hint) {
                ^

/path/to/libzmq/tests/test_timers.cpp:50:19: warning: unused parameter ‘timer_id’ [-Wunused-parameter]
 void handler (int timer_id, void* arg)
                   ^
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 02:56:03 -05:00
Joe Eli McIlvain
cf5c288dda Rename udp_address::interface to iface for VS2015 build.
Resolves #1739.
2016-01-29 19:50:04 -08:00
somdoron
5ebfd1728f make udp support for radio-dish 2016-01-29 21:17:11 +02:00
somdoron
1960b4e8a9 Filtering messages on dish side 2016-01-29 10:53:47 +02:00
somdoron
c7d52ec260 radio-dish join/leave are ZMTP commands 2016-01-29 10:53:47 +02:00
somdoron
5054f2eb61 radio-dish is sending the group as first frame 2016-01-29 10:53:47 +02:00
somdoron
68675e23d9 adds group to zmq_msg 2016-01-29 10:53:42 +02:00
somdoron
b2718149e0 msg external storage is using content_t 2016-01-29 10:46:42 +02:00
somdoron
15ad6f8051 save some bytes in msg class 2016-01-28 18:53:35 +02:00
somdoron
dc945998a4 missing virtual modifier or session_base 2016-01-28 18:31:05 +02:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
somdoron
b8425a25cf radio-dish pattern 2016-01-27 18:22:48 +02:00
Constantin Rack
511d701de3 Merge pull request #1725 from GreatFruitOmsk/master 2016-01-22 16:00:33 +01:00
Ilya Kulakov
77f5344ff7 Fix VMCI compilation errors on Windows. 2016-01-22 20:34:23 +06:00
Min RK
f0dce000b2 stop previous monitor socket before starting new one
avoids leaking sockets due to multiple monitor calls on one socket

Alternative: raise error (not sure what errno; EADDRINUSE?) if collision detected; force manual stop.
2016-01-21 16:21:07 +01:00
Ilya Kulakov
6c9974770b Family is not set when resolving NIC on android.
Make it ready to enable ipv6 for AIX or HP/UX
2016-01-21 19:53:35 +06:00
Ilya Kulakov
e7850410f8 Fix trailing spaces. 2016-01-21 13:44:15 +06:00
Ilya Kulakov
e5894d5197 Fix missing headers which makes compilation fail on Android. 2016-01-21 13:44:01 +06:00
Constantin Rack
924bce6478 Problem: build fails due to undefined INT_MAX
Solution: include climits

Fixes #1720
2016-01-20 19:16:54 +01:00
Min RK
5fe75f0e43 truncate rc to INT_MAX
to avoid overflow for large messages

send/recv still succeed for large messages,
but `zmq_msg_size` must be used to get the true size.
2016-01-20 13:43:51 +01:00
Constantin Rack
90f9f5ff91 Merge pull request #1718 from gcsideal/master
Last bits of Hurd support
2016-01-20 11:28:18 +01:00
Laszlo Boszormenyi (GCS)
be387d5e56 Last bits of Hurd support 2016-01-20 07:18:22 +01:00
Constantin Rack
e6edc4729e Problem: typo
Solution: fix it
2016-01-19 21:23:42 +01:00
somdoron
669c5697c2 fixing a bug: client over inproc receives msg with routing id set 2016-01-19 20:18:04 +02:00
somdoron
4bfe2ec686 fix bug in condition variable using invalid timeout 2016-01-18 15:32:49 +02:00
Laszlo Boszormenyi (GCS)
be5ab6d5c9 GNU/Hurd support 2016-01-16 02:26:20 +01:00
somdoron
6bbca7cf4a fix case when zmq_poller access a dead socket 2016-01-13 15:12:47 +02:00
Frederic Tregon
89417ddb9f Fixed issue #1690 (ZMQ_REQ_RELAXED)
When using ZMQ_REQ_RELAXED and a 'send' is executed after another 'send' the
previous code would terminate the 'reply_pipe' if any.
This is incorrect as terminating the reply pipe also terminates the send pipe
as they are the same (a pipe associated with a socket is bidirectional).
Doing a terminate on the pipe sets an internal flag called out_active to false
and the pipe can no longer send messages.
Removing the 'terminate' solves the problem. Removing this call is not an issue
as the incorrect ordering of messages that could be incurred is taken care of
by the ZMQ_REQ_CORRELATE option if needed.
2016-01-01 19:19:33 +01:00
Pieter Hintjens
2566c02a9e Problem: CLIENT and SERVER don't check SNDMORE
These sockets don't handle multipart data, so if callers send it,
they drop frames, and things break silently.

Solution: if the caller tries to use ZMQ_SNDMORE, return -1 and
set errno to EINVAL.
2015-12-29 17:00:06 +01:00
Pieter Hintjens
6665bffe11 Problem: MSVC projects don't include timers.cpp/hpp
Solution: add these
2015-12-21 11:09:11 +01:00
Pieter Hintjens
7893a6ac26 Problem: zmq poller API is not CLASS conformant
Solution: change zmq_poller_close(p) to zmq_poller_destroy(&p)
2015-12-21 11:01:16 +01:00
Pieter Hintjens
f8b9ca5f42 Problem: zmq timers API is not CLASS conformant
If we're going to add CLASS-like APIs we should use the proper
syntax; specifically 'destroy' instead of 'close', which is a
hangover from the 'ZeroMQ is like sockets' model we're slowly
moving away from.

Solution: change zmq_timers_close(p) to zmq_timers_destroy(&p)
2015-12-21 10:56:37 +01:00
Pieter Hintjens
97092d994d Problem: Windows build gives warning on v2_decoder.cpp:130
Solution: add explicit cast
2015-12-20 19:13:49 +01:00
Constantin Rack
c19470ece1 Merge pull request #1675 from somdoron/Timers
Problem: no way to schedule timers with zmq_poll or zmq_poller
2015-12-18 11:34:39 +01:00
somdoron
aadaf99011 add timers API to libzmq 2015-12-18 12:23:22 +02:00
Ilya Kulakov
b76ccb8b1a Add missing header for the if_nametoindex on Windows. 2015-12-18 15:54:18 +06:00
Constantin Rack
b67cdcfd0b Merge pull request #1670 from hintjens/master
CI was broken by #54799c (reverted)
2015-12-18 09:06:12 +01:00
Brian Silverman
700b91d102 Fix alignment of initial chunk in yqueue
Clang's UndefinedBehaviorSanitizer catches this in the tests.
2015-12-17 14:28:15 -05:00
Pieter Hintjens
31c35498af Revert "fixes #1565: Allow session to flush commands on an engine error"
This reverts commit 54799c8c6fa605f7272e966912f6e93161f9d11d.

This change broke the tests/test_shutdown_stress testcase.
2015-12-17 16:20:48 +01:00
Ilya Kulakov
3caa637e1b Add special interface to represent local VMCI context. 2015-12-14 19:20:27 +06:00
Sathish Yenna
7cfa93352e Add missing support for IPv6 link local addresses (which include % followed by the interface name) 2015-12-09 16:26:34 -06:00
Ilya Kulakov
6ae70a9428 Remove unnecessray comment and unnecessary include. 2015-12-09 15:45:15 +06:00
Luca Boccassi
a556b500da Problem: build failure, vmci include out of IFDEF
Solution: do not include vmci header outside of vmci IFDEF
Fixes issue #1655
2015-12-08 17:53:31 +00:00
Ilya Kulakov
68b13fbddb Add the VMCI transport.
VMCI transport allows fast communication between the Host
and a virtual machine, between virtual machines on the same host,
and within a virtual machine (like IPC).

It requires VMware to be installed on the host and Guest Additions
to be installed on a guest.
2015-12-08 13:16:09 +06:00
Chris
ba3cf3c006 Only start the heartbeat timer when the underlying mechanism is ready to stop cipher streams from trying to encrypt a heartbeat before the handshake has completed. Addresses issue #1601. 2015-11-30 20:18:25 +00:00
Charles Stanley
54799c8c6f fixes #1565: Allow session to flush commands on an engine error 2015-11-30 10:05:47 -05:00
Fedor Sheremetyev
bad93c536a Set LWM to half of HWL.
This reduces chances of race between writer deactivation and activation.

Reader sends activation command to writer when number or messages is
multiple of LWM. In situation with high throughput (millions of messages
per second) and correspondingly large HWM (e.g. 10M) the difference
between HWM needs to be large enough - so that activation command is
received before pipe becomes full.
2015-11-24 17:33:38 +00:00
Constantin Rack
f9b8a94c90 Problem: out_batch_size has been replaced by ZMQ_TCP_SEND_BUFFER option in cdeec4c1
Solution: remove `out_batch_size` from src/config.hpp
2015-11-24 09:04:07 +01:00
Jim Hague
e71471b2e8 Add new option ZMQ_MULTICAST_MAXTPDU to set PGM_MTU.
Fixes #1646
2015-11-23 19:35:02 +00:00
somdoron
804bce8294 Fix pipe terimation in router while reading message 2015-11-20 21:27:56 +02:00
somdoron
210572201d Fix a bug when stream_engine try to set alreadt set metadata 2015-11-18 15:02:19 +02:00
Constantin Rack
ec41f6540f Problem: tcp_recv/send_buffer should be byte value instead of scale factor
Solution: change option behaviour and adopt documentation
2015-11-13 10:47:15 +01:00
Constantin Rack
a992d9aca0 Problem: comparison between signed and unsigned integer expressions
Solution: make tcp_recv_buffer_size and tcp_send_buffer_size unsigned
2015-11-13 10:08:30 +01:00
Constantin Rack
98d5d4d7f0 Problem: call of overloaded ‘pow()’ is ambiguous
Solution: make base a double value
2015-11-13 09:47:03 +01:00
Jens Auer
908d6b6740 Update options.cpp
Fixed ZMQ_TCP_RECV_BUFFER set case.
2015-11-08 21:48:36 +01:00
Jens Auer
cdeec4c115 New options to set send/recv buffer size for TCP sockets. 2015-11-08 19:00:29 +01:00
William Swanson
b2010432c7 Do not crash on unusual connection-failure cases
Only assert on errors we know are our fault,
instead of trying to whitelist every possible network-related failure.
This makes ZeroMQ more portable to other platforms
where the possible errors are different.

In particular, the previous code would often die under iOS.
2015-11-02 14:59:15 -08:00
Constantin Rack
22179afaba Merge pull request #1629 from hintjens/master
Problem: Windows 7 TCP slow start
2015-11-01 13:16:55 +01:00
Pieter Hintjens
54e2e2a7ad Problem: Windows 7 TCP slow start
See issue #1608.

This is an old issue with Windows 7. The effect is that we see a latency
ramp on the first 500 messages.

* The ramp is unaffected by message size.
* Sleeping up to 100msec between sends has no effect except to switch
    off ZeroMQ batching so making the ramp more visible.
* After 500 messages, latency falls back down to ~10-40 usec.
* Over inproc:// the ramp happens when we use the signaler class.
* Client-server over inproc:// does not show the ramp.
* Client-server over tcp:// shows a similar ramp.

We know that the signaller is using TCP on Windows. We can 'prime' the
connection by doing 500 dummy sends. This potentially causes new sockets
to be delayed on creation, which is not a good solution.

Note that the signaller sends zero-byte messages. This may also be
confusing TCP.

Solution: flood the receive buffer when creating a new FD pair; send a
1M buffer and discard it.

Fixes #1608
2015-11-01 12:57:53 +01:00