Skip to content

Instantly share code, notes, and snippets.

@blakesmith
Created May 27, 2011 15:52
Show Gist options
  • Select an option

  • Save blakesmith/995542 to your computer and use it in GitHub Desktop.

Select an option

Save blakesmith/995542 to your computer and use it in GitHub Desktop.
ZMQ Envelope Deliminators
// I'm confused about enveloping and 'blank frames'.
// One example from the ZMQ guide seems to have each envelope
// separated by an empty frame, and the other has one empty
// frame to deliminate the entire envelope stack. Which is
// correct? Or are there two different things going on here?
// LRU Queue example
s_sendmore (backend, worker_queue [0]);
s_sendmore (backend, "");
s_sendmore (backend, client_addr);
s_sendmore (backend, "");
s_send     (backend, request);
//Router to papa example
s_sendmore (client, "A");
s_sendmore (client, "address 3");
s_sendmore (client, "address 2");
s_sendmore (client, "address 1");
s_sendmore (client, "");
s_send     (client, "This is the workload");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment