This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/dist.cpp b/src/dist.cpp | |
index 093da79..9201294 100644 | |
--- a/src/dist.cpp | |
+++ b/src/dist.cpp | |
@@ -23,9 +23,11 @@ | |
#include "err.hpp" | |
#include "own.hpp" | |
#include "msg.hpp" | |
+#include "likely.hpp" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Force not to use eventfd | |
AC_ARG_ENABLE([eventfd], [AS_HELP_STRING([--disable-eventfd], [disable eventfd [default=no]])], | |
[disable_eventfd=yes], [disable_eventfd=no]) | |
eventfd_headers="no" | |
eventfd_can_run="no" | |
if test "x$disable_eventfd" != "xyes"; then | |
# Check if we have eventfd.h header file. | |
AC_CHECK_HEADERS(sys/eventfd.h, [eventfd_headers=yes]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zmq.hpp> | |
int main () | |
{ | |
zmq::context_t ctx (1); | |
zmq::socket_t s (ctx, ZMQ_REQ); | |
zmq::pollitem_t pi; | |
pi.socket = s; | |
pi.events = ZMQ_POLLIN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/router.cpp | |
+++ b/src/router.cpp | |
@@ -123,7 +123,7 @@ int zmq::router_t::xsend (msg_t *msg_, int flags_) | |
// If we have malformed message (prefix with no subsequent message) | |
// then just silently ignore it. | |
// TODO: The connections should be killed instead. | |
- if (msg_->flags () & msg_t::label) { | |
+ if (msg_->flags () & msg_t::more) { | |
more_out = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zmq.hpp> | |
#include <stdio.h> | |
#include <stdint.h> | |
int main () | |
{ | |
zmq::context_t context (1); | |
zmq::socket_t s (context, ZMQ_DEALER); | |
uint64_t hwm = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zmq.hpp> | |
int main (int argc, char *argv []) | |
{ | |
zmq::context_t context (1); | |
zmq::socket_t s (context, ZMQ_XREP); | |
s.connect ("tcp://127.0.0.1:11132"); | |
for (int i = 0; i < 1000; i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sp.h> | |
#include <assert.h> | |
#include <stdio.h> | |
int main (int argc, char *argv[]) | |
{ | |
int sock, rc; | |
struct sockaddr_sp addr; | |
char buffer [1024]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <xs.h> | |
#include <assert.h> | |
#include <stdio.h> | |
int main () | |
{ | |
void *ctx = xs_init (); | |
assert (ctx); | |
int rc = xs_plug (ctx, "/usr/local/lib/libfskeleton.so"); | |
assert (rc == 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <xs.h> | |
#include <assert.h> | |
#include <unistd.h> | |
#include <string.h> | |
int main () | |
{ | |
int rc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdmill.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
struct connection | |
{ | |
struct tcpsocket s; | |
}; |