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
d092f261
Commit
d092f261
authored
Feb 16, 2012
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed peek/poke to get/set
parent
dcc1725a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
26 deletions
+26
-26
Makefile.am
doc/Makefile.am
+1
-1
zmq.txt
doc/zmq.txt
+2
-2
zmq_msg_get.txt
doc/zmq_msg_get.txt
+7
-7
zmq_msg_set.txt
doc/zmq_msg_set.txt
+6
-6
zmq.h
include/zmq.h
+4
-4
zmq.cpp
src/zmq.cpp
+3
-3
test_msg_flags.cpp
tests/test_msg_flags.cpp
+3
-3
No files found.
doc/Makefile.am
View file @
d092f261
...
...
@@ -3,7 +3,7 @@ MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_init.3 \
zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3
\
zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3
\
zmq_strerror.3 zmq_term.3 zmq_version.3 zmq_getsockopt.3 zmq_errno.3
\
zmq_sendmsg.3 zmq_recvmsg.3 zmq_msg_
peek.3 zmq_msg_poke
.3 zmq_msg_more.3
zmq_sendmsg.3 zmq_recvmsg.3 zmq_msg_
get.3 zmq_msg_set
.3 zmq_msg_more.3
MAN7
=
zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7
MAN_DOC
=
$(MAN1)
$(MAN3)
$(MAN7)
...
...
doc/zmq.txt
View file @
d092f261
...
...
@@ -86,8 +86,8 @@ Access message content::
linkzmq:zmq_msg_more[3]
Work with message properties::
linkzmq:zmq_msg_
peek
[3]
linkzmq:zmq_msg_
poke
[3]
linkzmq:zmq_msg_
get
[3]
linkzmq:zmq_msg_
set
[3]
Message manipulation::
linkzmq:zmq_msg_copy[3]
...
...
doc/zmq_msg_
peek
.txt
→
doc/zmq_msg_
get
.txt
View file @
d092f261
zmq_msg_
peek
(3)
==============
=
zmq_msg_
get
(3)
==============
NAME
----
zmq_msg_
peek
- get message options
zmq_msg_
get
- get message options
SYNOPSIS
--------
*int zmq_msg_
peek
(zmq_msg_t '*message', int 'option_name', void '*option_value', size_t '*option_len');*
*int zmq_msg_
get
(zmq_msg_t '*message', int 'option_name', void '*option_value', size_t '*option_len');*
DESCRIPTION
-----------
The _zmq_msg_
peek
()_ function shall retrieve the value for the option
The _zmq_msg_
get
()_ function shall retrieve the value for the option
specified by the 'option_name' argument for the message pointed to by the
'message' argument, and store it in the buffer pointed to by the 'option_value'
argument. The 'option_len' argument is the size in bytes of the buffer pointed
...
...
@@ -22,14 +22,14 @@ to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall
modify the 'option_len' argument to indicate the actual size of the option
value stored in the buffer.
The following options can be retrieved with the _zmq_msg_
peek
()_ function:
The following options can be retrieved with the _zmq_msg_
get
()_ function:
*ZMQ_MORE*::
Indicates that there are more message parts to follow after the 'message'.
RETURN VALUE
------------
The _zmq_msg_
peek
()_ function shall return zero if successful. Otherwise it
The _zmq_msg_
get
()_ function shall return zero if successful. Otherwise it
shall return `-1` and set 'errno' to one of the values defined below.
...
...
doc/zmq_msg_
poke
.txt
→
doc/zmq_msg_
set
.txt
View file @
d092f261
zmq_msg_
poke
(3)
==============
=
zmq_msg_
set
(3)
==============
NAME
----
zmq_msg_
poke
- set message options
zmq_msg_
set
- set message options
SYNOPSIS
...
...
@@ -15,17 +15,17 @@ SYNOPSIS
DESCRIPTION
-----------
The _zmq_msg_
poke
()_ function shall set the option specified by the
The _zmq_msg_
set
()_ function shall set the option specified by the
'option_name' argument to the value pointed to by the 'option_value' argument
for the 0MQ socket pointed to by the 'socket' argument. The 'option_len'
argument is the size of the option value in bytes.
Currently the _zmq_msg_
poke
()_ function does not support any option names.
Currently the _zmq_msg_
set
()_ function does not support any option names.
RETURN VALUE
------------
The _zmq_msg_
poke
()_ function shall return zero if successful. Otherwise it
The _zmq_msg_
set
()_ function shall return zero if successful. Otherwise it
shall return `-1` and set 'errno' to one of the values defined below.
...
...
include/zmq.h
View file @
d092f261
...
...
@@ -167,10 +167,10 @@ ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
ZMQ_EXPORT
void
*
zmq_msg_data
(
zmq_msg_t
*
msg
);
ZMQ_EXPORT
size_t
zmq_msg_size
(
zmq_msg_t
*
msg
);
ZMQ_EXPORT
int
zmq_msg_more
(
zmq_msg_t
*
msg
);
ZMQ_EXPORT
int
zmq_msg_
peek
(
zmq_msg_t
*
msg
,
int
option
,
void
*
optval
,
size_t
*
optvallen
);
ZMQ_EXPORT
int
zmq_msg_
poke
(
zmq_msg_t
*
msg
,
int
option
,
const
void
*
optval
,
size_t
*
optvallen
);
ZMQ_EXPORT
int
zmq_msg_
get
(
zmq_msg_t
*
msg
,
int
option
,
void
*
optval
,
size_t
*
optvallen
);
ZMQ_EXPORT
int
zmq_msg_
set
(
zmq_msg_t
*
msg
,
int
option
,
const
void
*
optval
,
size_t
*
optvallen
);
/******************************************************************************/
...
...
src/zmq.cpp
View file @
d092f261
...
...
@@ -545,12 +545,12 @@ int zmq_msg_more (zmq_msg_t *msg_)
{
int
more
;
size_t
more_size
=
sizeof
(
more
);
int
rc
=
zmq_msg_
peek
(
msg_
,
ZMQ_MORE
,
&
more
,
&
more_size
);
int
rc
=
zmq_msg_
get
(
msg_
,
ZMQ_MORE
,
&
more
,
&
more_size
);
assert
(
rc
==
0
);
return
more
;
}
int
zmq_msg_
peek
(
zmq_msg_t
*
msg_
,
int
option_
,
void
*
optval_
,
int
zmq_msg_
get
(
zmq_msg_t
*
msg_
,
int
option_
,
void
*
optval_
,
size_t
*
optvallen_
)
{
if
(
!
msg_
)
{
...
...
@@ -573,7 +573,7 @@ int zmq_msg_peek (zmq_msg_t *msg_, int option_, void *optval_,
}
}
int
zmq_msg_
poke
(
zmq_msg_t
*
msg_
,
int
option_
,
const
void
*
optval_
,
int
zmq_msg_
set
(
zmq_msg_t
*
msg_
,
int
option_
,
const
void
*
optval_
,
size_t
*
optvallen_
)
{
if
(
!
msg_
)
{
...
...
tests/test_msg_flags.cpp
View file @
d092f261
...
...
@@ -52,7 +52,7 @@ int main (int argc, char *argv [])
assert
(
rc
>=
0
);
int
more
;
size_t
more_size
=
sizeof
(
more
);
rc
=
zmq_msg_
peek
(
&
msg
,
ZMQ_MORE
,
&
more
,
&
more_size
);
rc
=
zmq_msg_
get
(
&
msg
,
ZMQ_MORE
,
&
more
,
&
more_size
);
assert
(
rc
==
0
);
assert
(
more
==
1
);
...
...
@@ -60,7 +60,7 @@ int main (int argc, char *argv [])
rc
=
zmq_recvmsg
(
sb
,
&
msg
,
0
);
assert
(
rc
==
1
);
more_size
=
sizeof
(
more
);
rc
=
zmq_msg_
peek
(
&
msg
,
ZMQ_MORE
,
&
more
,
&
more_size
);
rc
=
zmq_msg_
get
(
&
msg
,
ZMQ_MORE
,
&
more
,
&
more_size
);
assert
(
rc
==
0
);
assert
(
more
==
1
);
...
...
@@ -68,7 +68,7 @@ int main (int argc, char *argv [])
rc
=
zmq_recvmsg
(
sb
,
&
msg
,
0
);
assert
(
rc
==
1
);
more_size
=
sizeof
(
more
);
rc
=
zmq_msg_
peek
(
&
msg
,
ZMQ_MORE
,
&
more
,
&
more_size
);
rc
=
zmq_msg_
get
(
&
msg
,
ZMQ_MORE
,
&
more
,
&
more_size
);
assert
(
rc
==
0
);
assert
(
more
==
0
);
...
...
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