Multi-hop REQ/REP, part IX., pass the peer identity as far as socket_base_t

This commit is contained in:
Martin Sustrik
2010-02-13 15:30:03 +01:00
parent f5ce81f289
commit 4405250d93
10 changed files with 46 additions and 16 deletions

View File

@@ -89,8 +89,11 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
if (options.identity.size () > 0) {
// Create gsi from identity string.
gsi_base = options.identity;
// Create gsi from identity.
// TODO: We assume that identity is standard C string here.
// What if it contains binary zeroes?
gsi_base.assign ((const char*) options.identity.data (),
options.identity.size ());
} else {
// Generate random gsi.