Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
25461a78
Commit
25461a78
authored
May 29, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: members of mechanmism_t are needlessly protected
Solution: make them private
parent
2dfdcaff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
mechanism.cpp
src/mechanism.cpp
+2
-2
mechanism.hpp
src/mechanism.hpp
+10
-7
No files found.
src/mechanism.cpp
View file @
25461a78
...
...
@@ -63,7 +63,7 @@ void zmq::mechanism_t::peer_routing_id (msg_t *msg_)
void
zmq
::
mechanism_t
::
set_user_id
(
const
void
*
data_
,
size_t
size_
)
{
_user_id
.
set
(
static_cast
<
const
unsigned
char
*>
(
data_
),
size_
);
zap_properties
.
ZMQ_MAP_INSERT_OR_EMPLACE
(
_
zap_properties
.
ZMQ_MAP_INSERT_OR_EMPLACE
(
std
::
string
(
ZMQ_MSG_PROPERTY_USER_ID
),
std
::
string
(
reinterpret_cast
<
const
char
*>
(
data_
),
size_
));
}
...
...
@@ -268,7 +268,7 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_,
if
(
rc
==
-
1
)
return
-
1
;
}
(
zap_flag_
?
zap_properties
:
zmtp_properties
)
(
zap_flag_
?
_zap_properties
:
_
zmtp_properties
)
.
ZMQ_MAP_INSERT_OR_EMPLACE
(
name
,
std
::
string
(
reinterpret_cast
<
const
char
*>
(
value
),
value_length
));
...
...
src/mechanism.hpp
View file @
25461a78
...
...
@@ -81,9 +81,12 @@ class mechanism_t
const
blob_t
&
get_user_id
()
const
;
const
metadata_t
::
dict_t
&
get_zmtp_properties
()
{
return
zmtp_properties
;
}
const
metadata_t
::
dict_t
&
get_zmtp_properties
()
{
return
_zmtp_properties
;
}
const
metadata_t
::
dict_t
&
get_zap_properties
()
{
return
zap_properties
;
}
const
metadata_t
::
dict_t
&
get_zap_properties
()
{
return
_
zap_properties
;
}
protected
:
// Only used to identify the socket for the Socket-Type
...
...
@@ -123,15 +126,15 @@ class mechanism_t
virtual
int
property
(
const
std
::
string
&
name_
,
const
void
*
value_
,
size_t
length_
);
const
options_t
options
;
private
:
// Properties received from ZMTP peer.
metadata_t
::
dict_t
zmtp_properties
;
metadata_t
::
dict_t
_
zmtp_properties
;
// Properties received from ZAP server.
metadata_t
::
dict_t
zap_properties
;
metadata_t
::
dict_t
_
zap_properties
;
const
options_t
options
;
private
:
blob_t
_routing_id
;
blob_t
_user_id
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment