diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-04-29 07:19:22 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-04-29 07:19:22 +0200 |
commit | b2eb84f8ca2fc2b8a2af6cd2c54c0abc4535cfc4 (patch) | |
tree | 76a2cf52187979a3c2deea324bd2915e6b406d17 /src/socket_base.cpp | |
parent | 10fbc78e5cab494c3af727f5ea451fdced1c9d95 (diff) |
Substantial simplification of uuid_t
The string format of UUID is not used in 0MQ. Further on,
it turns out that UUIDs have fixed microarchitecture-agnostic
binary layout (see RFC4122). Thus, the conversion to string
and back to binary can be avoided.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r-- | src/socket_base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index d8af516..3e104a8 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -219,8 +219,8 @@ void zmq::socket_base_t::attach_pipes (class reader_t *inpipe_, xattach_pipes (inpipe_, outpipe_, peer_identity_); } else { - blob_t identity (1, 0); - identity.append (uuid_t ().to_blob (), uuid_t::uuid_blob_len); + blob_t identity (17, 0); + generate_uuid ((unsigned char*) identity.data () + 1); xattach_pipes (inpipe_, outpipe_, identity); } } |