The PGM transport supports the omission of the network interface to
select the default one like:
announce.connect("epgm://eth0;239.255.128.46:64646"); // Use eth0
announce.connect("epgm://239.255.128.46:64646"); // Use the default
Also, mention C++ in the additional community bindings of 0MQ in
zmq.txt.
The current ZMQ_MONITOR code does not compile in gcc 4.7, as -pedantic
and -Werror are enabled, and ISO C++ doesn't allow casting between
normal pointers (void*) and function pointers, as pedantically their
size could be different. This caused the library not compilable. This
commit workaround the problem by introducing one more indirection, i.e.
instead of calling
(void *)listener
which is an error, we have to use
*(void **)&listener
which is an undefined behavior :) but works on most platforms
Also, `optval_ = monitor` will not set the parameter in getsockopt(),
and the extra casting caused the LHS to be an rvalue which again makes
the code not compilable. The proper way is to pass a pointer of function
pointer and assign with indirection, i.e. `*optval_ = monitor`.
Also, fixed an asciidoc error in zmq_getsockopt.txt because the `~~~~`
is too long.
Expose a ZMQ_MONITOR socket option to register a callback for notification of state changes in socket state ( stream engine, tcp and ipc transport only )
This patch fixes a bug in the message encoder which was
responsible for computing incorrect message offset.
The bug affected PGM receiver making it unable to
decode inital messages.
File decoder.cpp does not compile with Visual C++ 2008:
1>c:\tmp\libzmq\src\decoder.cpp(117) : warning C4003: not enough actual parameters for macro 'max'
1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2589: '(' : illegal token on right side of '::'
1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2059: syntax error : '::'
1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2143: syntax error : missing ';' before '{'
This error is caused by the precense of a macro 'max' when including
'windows.h'. To solve this problem, the preprocessor macro /DNOMINMAX must
be specified.
shadowing a real EAGAIN return value from the OS. This caused later
assertions of "Invalid argument" in stream_engine.cpp when it attempted to
use a socket which was not connected.
I also add EINTR to mean EINPROGRESS, as per the POSIX and FreeBSD
documentation which specifies that a connect() call interrupted due to a
signal will complete asynchronously.
Signed-off-by: Martin Lucina <martin@lucina.net>