Permalink
Browse files

Merge pull request #538 from wesyoung/fix/zproj

Problem: out of sync with zproject
  • Loading branch information...
bluca committed Aug 2, 2017
2 parents e8a737c + 038ac4f commit b2d1c164bf21eccfdb2b1b2ac0905c9518fb8e8b
Showing with 1,617 additions and 1,421 deletions.
  1. +24 −1 CMakeLists.txt
  2. +1 −2 Vagrantfile
  3. +36 −36 bindings/jni/src/main/java/org/zeromq/zyre/Zyre.java
  4. +8 −8 bindings/jni/src/main/java/org/zeromq/zyre/ZyreEvent.java
  5. +44 −44 bindings/lua_ffi/zyre_ffi.lua
  6. +7 −7 bindings/nodejs/binding.cc
  7. +7 −7 bindings/nodejs/binding.h
  8. +9 −8 bindings/python/zyre/_zyre_ctypes.py
  9. +8 −27 bindings/python_cffi/setup.py
  10. +54 −54 bindings/qml/README.md
  11. +3 −3 bindings/qml/qml_zyre_bindings.pro
  12. +36 −36 bindings/qml/src/QmlZyre.cpp
  13. +42 −42 bindings/qml/src/QmlZyre.h
  14. +8 −8 bindings/qml/src/QmlZyreEvent.cpp
  15. +14 −14 bindings/qml/src/QmlZyreEvent.h
  16. +1 −1 bindings/qml/src/qml_zyre_plugin.h
  17. +24 −23 bindings/qt/src/qzframe.cpp
  18. +19 −18 bindings/qt/src/qzframe.h
  19. +58 −58 bindings/qt/src/qzhash.cpp
  20. +53 −53 bindings/qt/src/qzhash.h
  21. +34 −34 bindings/qt/src/qzlist.cpp
  22. +28 −28 bindings/qt/src/qzlist.h
  23. +50 −50 bindings/qt/src/qzmsg.cpp
  24. +46 −46 bindings/qt/src/qzmsg.h
  25. +321 −321 bindings/qt/src/qzsock.cpp
  26. +241 −241 bindings/qt/src/qzsock.h
  27. +49 −49 bindings/qt/src/qzyre.cpp
  28. +10 −10 bindings/qt/src/qzyreevent.cpp
  29. +8 −8 bindings/qt/src/qzyreevent.h
  30. +8 −8 bindings/ruby/lib/zyre/ffi/event.rb
  31. +36 −36 bindings/ruby/lib/zyre/ffi/zyre.rb
  32. +7 −7 builds/gyp/platform.h
  33. +6 −5 ci_build.sh
  34. +5 −1 configure.ac
  35. +36 −36 include/zyre.h
  36. +15 −15 include/zyre_event.h
  37. +7 −7 include/zyre_library.h
  38. +43 −16 packaging/debian/control
  39. +8 −8 packaging/debian/copyright
  40. +0 −2 packaging/debian/libzyre-dev.install
  41. +53 −13 packaging/debian/rules
  42. +3 −0 packaging/debian/zyre.dsc.obs
  43. +0 −1 packaging/debian/zyre.install
  44. +10 −0 packaging/obs/_service
  45. +77 −8 packaging/redhat/zyre.spec
  46. +1 −0 project.xml
  47. +37 −0 src/Makemodule.am
  48. +8 −7 src/zyre_classes.h
  49. +7 −7 src/zyre_private_selftest.c
  50. +7 −7 src/zyre_selftest.c
View
@@ -178,7 +178,10 @@ set_target_properties(zyre
PROPERTIES DEFINE_SYMBOL "ZYRE_EXPORTS"
)
set_target_properties (zyre
PROPERTIES SOVERSION "2.0.1"
PROPERTIES SOVERSION "2"
)
set_target_properties (zyre
PROPERTIES VERSION "2.0.1"
)
target_link_libraries(zyre
${ZEROMQ_LIBRARIES} ${MORE_LIBRARIES}
@@ -312,6 +315,22 @@ IF (ENABLE_DRAFTS)
)
ENDIF (ENABLE_DRAFTS)
add_custom_target(
copy-selftest-ro ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/selftest-ro ${CMAKE_BINARY_DIR}/src/selftest-ro
)
add_custom_target(
make-selftest-rw ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/src/selftest-rw
)
set_directory_properties(
PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_BINARY_DIR}/src/selftest-ro;${CMAKE_BINARY_DIR}/src/selftest-rw"
)
foreach(TEST_CLASS ${TEST_CLASSES})
add_test(
NAME ${TEST_CLASS}
@@ -321,6 +340,10 @@ foreach(TEST_CLASS ${TEST_CLASSES})
${TEST_CLASS}
PROPERTIES TIMEOUT ${CLASSTEST_TIMEOUT}
)
set_tests_properties(
${TEST_CLASS}
PROPERTIES DEPENDS "copy-selftest-ro;make-selftest-rw"
)
endforeach(TEST_CLASS)
include(CTest)
View
@@ -4,7 +4,6 @@
# This will setup a clean Ubuntu1404 LTS env
$script = <<SCRIPT
add-apt-repository ppa:fkrull/deadsnakes-python2.7
apt-get update
apt-get install -y python-pip python-dev git htop virtualenvwrapper python2.7 python-virtualenv python-support cython \
git build-essential libtool pkg-config autotools-dev autoconf automake cmake uuid-dev libpcre3-dev valgrind \
@@ -49,7 +48,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", inline: $script
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2", "--ioapic", "on", "--memory", "512" ]
vb.customize ["modifyvm", :id, "--cpus", "2", "--ioapic", "on", "--memory", "1024" ]
end
if File.file?(VAGRANTFILE_LOCAL)
@@ -19,9 +19,9 @@
public long self;
/*
Constructor, creates a new Zyre node. Note that until you start the
node it is silent and invisible to other nodes on the network.
The node name is provided to other nodes during discovery. If you
specify NULL, Zyre generates a randomized node name from the UUID.
node it is silent and invisible to other nodes on the network.
The node name is provided to other nodes during discovery. If you
specify NULL, Zyre generates a randomized node name from the UUID.
*/
native static long __new (String name);
public Zyre (String name) {
@@ -33,7 +33,7 @@ public Zyre (long pointer) {
}
/*
Destructor, destroys a Zyre node. When you destroy a node, any
messages it is sending or receiving will be discarded.
messages it is sending or receiving will be discarded.
*/
native static void __destroy (long self);
@Override
@@ -50,31 +50,31 @@ public String uuid () {
}
/*
Return our node name, after successful initialization. First 6
characters of UUID by default.
characters of UUID by default.
*/
native static String __name (long self);
public String name () {
return __name (self);
}
/*
Set the public name of this node overriding the default. The name is
provide during discovery and come in each ENTER message.
provide during discovery and come in each ENTER message.
*/
native static void __setName (long self, String name);
public void setName (String name) {
__setName (self, name);
}
/*
Set node header; these are provided to other nodes during discovery
and come in each ENTER message.
and come in each ENTER message.
*/
native static void __setHeader (long self, String name, String format);
public void setHeader (String name, String format) {
__setHeader (self, name, format);
}
/*
Set verbose mode; this tells the node to log all traffic as well as
all major events.
all major events.
*/
native static void __setVerbose (long self);
public void setVerbose () {
@@ -83,7 +83,7 @@ public void setVerbose () {
/*
Set UDP beacon discovery port; defaults to 5670, this call overrides
that so you can create independent clusters on the same network, for
e.g. development vs. production. Has no effect after zyre_start().
e.g. development vs. production. Has no effect after zyre_start().
*/
native static void __setPort (long self, int portNbr);
public void setPort (int portNbr) {
@@ -92,8 +92,8 @@ public void setPort (int portNbr) {
/*
Set the peer evasiveness timeout, in milliseconds. Default is 5000.
This can be tuned in order to deal with expected network conditions
and the response time expected by the application. This is tied to
the beacon interval and rate of messages received.
and the response time expected by the application. This is tied to
the beacon interval and rate of messages received.
*/
native static void __setEvasiveTimeout (long self, int interval);
public void setEvasiveTimeout (int interval) {
@@ -102,16 +102,16 @@ public void setEvasiveTimeout (int interval) {
/*
Set the peer expiration timeout, in milliseconds. Default is 30000.
This can be tuned in order to deal with expected network conditions
and the response time expected by the application. This is tied to
the beacon interval and rate of messages received.
and the response time expected by the application. This is tied to
the beacon interval and rate of messages received.
*/
native static void __setExpiredTimeout (long self, int interval);
public void setExpiredTimeout (int interval) {
__setExpiredTimeout (self, interval);
}
/*
Set UDP beacon discovery interval, in milliseconds. Default is instant
beacon exploration followed by pinging every 1,000 msecs.
beacon exploration followed by pinging every 1,000 msecs.
*/
native static void __setInterval (long self, long interval);
public void setInterval (long interval) {
@@ -120,21 +120,21 @@ public void setInterval (long interval) {
/*
Set network interface for UDP beacons. If you do not set this, CZMQ will
choose an interface for you. On boxes with several interfaces you should
specify which one you want to use, or strange things can happen.
specify which one you want to use, or strange things can happen.
*/
native static void __setInterface (long self, String value);
public void setInterface (String value) {
__setInterface (self, value);
}
/*
By default, Zyre binds to an ephemeral TCP port and broadcasts the local
host name using UDP beaconing. When you call this method, Zyre will use
gossip discovery instead of UDP beaconing. You MUST set-up the gossip
By default, Zyre binds to an ephemeral TCP port and broadcasts the local
host name using UDP beaconing. When you call this method, Zyre will use
gossip discovery instead of UDP beaconing. You MUST set-up the gossip
service separately using zyre_gossip_bind() and _connect(). Note that the
endpoint MUST be valid for both bind and connect operations. You can use
inproc://, ipc://, or tcp:// transports (for tcp://, use an IP address
that is meaningful to remote as well as local nodes). Returns 0 if
the bind was successful, else -1.
endpoint MUST be valid for both bind and connect operations. You can use
inproc://, ipc://, or tcp:// transports (for tcp://, use an IP address
that is meaningful to remote as well as local nodes). Returns 0 if
the bind was successful, else -1.
*/
native static int __setEndpoint (long self, String format);
public int setEndpoint (String format) {
@@ -143,17 +143,17 @@ public int setEndpoint (String format) {
/*
Set-up gossip discovery of other nodes. At least one node in the cluster
must bind to a well-known gossip endpoint, so other nodes can connect to
it. Note that gossip endpoints are completely distinct from Zyre node
endpoints, and should not overlap (they can use the same transport).
it. Note that gossip endpoints are completely distinct from Zyre node
endpoints, and should not overlap (they can use the same transport).
*/
native static void __gossipBind (long self, String format);
public void gossipBind (String format) {
__gossipBind (self, format);
}
/*
Set-up gossip discovery of other nodes. A node may connect to multiple
other nodes, for redundancy paths. For details of the gossip network
design, see the CZMQ zgossip class.
other nodes, for redundancy paths. For details of the gossip network
design, see the CZMQ zgossip class.
*/
native static void __gossipConnect (long self, String format);
public void gossipConnect (String format) {
@@ -162,24 +162,24 @@ public void gossipConnect (String format) {
/*
Start node, after setting header values. When you start a node it
begins discovery and connection. Returns 0 if OK, -1 if it wasn't
possible to start the node.
possible to start the node.
*/
native static int __start (long self);
public int start () {
return __start (self);
}
/*
Stop node; this signals to other peers that this node will go away.
This is polite; however you can also just destroy the node without
stopping it.
This is polite; however you can also just destroy the node without
stopping it.
*/
native static void __stop (long self);
public void stop () {
__stop (self);
}
/*
Join a named group; after joining a group you can send messages to
the group and all Zyre nodes in that group will receive them.
the group and all Zyre nodes in that group will receive them.
*/
native static int __join (long self, String group);
public int join (String group) {
@@ -194,23 +194,23 @@ public int leave (String group) {
}
/*
Receive next message from network; the message may be a control
message (ENTER, EXIT, JOIN, LEAVE) or data (WHISPER, SHOUT).
Returns zmsg_t object, or NULL if interrupted
message (ENTER, EXIT, JOIN, LEAVE) or data (WHISPER, SHOUT).
Returns zmsg_t object, or NULL if interrupted
*/
native static long __recv (long self);
public Zmsg recv () {
return new Zmsg (__recv (self));
}
/*
Send message to single peer, specified as a UUID string
Destroys message after sending
Destroys message after sending
*/
native static int __whisper (long self, String peer, long msgP);
public int whisper (String peer, Zmsg msgP) {
return __whisper (self, peer, msgP.self);
}
/*
Send message to a named group
Send message to a named group
Destroys message after sending
*/
native static int __shout (long self, String group, long msgP);
@@ -268,7 +268,7 @@ public String peerAddress (String peer) {
}
/*
Return the value of a header of a conected peer.
Returns null if peer or key doesn't exits.
Returns null if peer or key doesn't exits.
*/
native static String __peerHeaderValue (long self, String peer, String name);
public String peerHeaderValue (String peer, String name) {
@@ -290,7 +290,7 @@ public void print () {
}
/*
Return the Zyre version for run-time API detection; returns
major * 10000 + minor * 100 + patch, as a single integer.
major * 10000 + minor * 100 + patch, as a single integer.
*/
native static long __version ();
public long version () {
@@ -19,8 +19,8 @@
public long self;
/*
Constructor: receive an event from the zyre node, wraps zyre_recv.
The event may be a control message (ENTER, EXIT, JOIN, LEAVE) or
data (WHISPER, SHOUT).
The event may be a control message (ENTER, EXIT, JOIN, LEAVE) or
data (WHISPER, SHOUT).
*/
native static long __new (long node);
public ZyreEvent (Zyre node) {
@@ -40,9 +40,9 @@ public void close () {
self = 0;
}
/*
Returns event type, as printable uppercase string. Choices are:
Returns event type, as printable uppercase string. Choices are:
"ENTER", "EXIT", "JOIN", "LEAVE", "EVASIVE", "WHISPER" and "SHOUT"
and for the local node: "STOP"
and for the local node: "STOP"
*/
native static String __type (long self);
public String type () {
@@ -77,7 +77,7 @@ public Zhash headers () {
return new Zhash (__headers (self));
}
/*
Returns value of a header from the message headers
Returns value of a header from the message headers
obtained by ENTER. Return NULL if no value was found.
*/
native static String __header (long self, String name);
@@ -93,16 +93,16 @@ public String group () {
}
/*
Returns the incoming message payload; the caller can modify the
message but does not own it and should not destroy it.
message but does not own it and should not destroy it.
*/
native static long __msg (long self);
public Zmsg msg () {
return new Zmsg (__msg (self));
}
/*
Returns the incoming message payload, and pass ownership to the
Returns the incoming message payload, and pass ownership to the
caller. The caller must destroy the message when finished with it.
After called on the given event, further calls will return NULL.
After called on the given event, further calls will return NULL.
*/
native static long __getMsg (long self);
public Zmsg getMsg () {
Oops, something went wrong.

0 comments on commit b2d1c16

Please sign in to comment.