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
bf08114b
Commit
bf08114b
authored
Mar 04, 2014
by
Ian Barber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #910 from hintjens/master
Added scaffolding for zmq_msg_gets
parents
8de07ad7
305a1442
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
6 deletions
+70
-6
Makefile.am
doc/Makefile.am
+1
-1
zmq_msg_gets.txt
doc/zmq_msg_gets.txt
+54
-0
zmq.h
include/zmq.h
+3
-2
zmq.cpp
src/zmq.cpp
+12
-3
No files found.
doc/Makefile.am
View file @
bf08114b
...
...
@@ -4,7 +4,7 @@ MAN3 = zmq_bind.3 zmq_unbind.3 zmq_connect.3 zmq_disconnect.3 zmq_close.3 \
zmq_msg_move.3 zmq_msg_copy.3 zmq_msg_size.3 zmq_msg_data.3 zmq_msg_close.3
\
zmq_msg_send.3 zmq_msg_recv.3
\
zmq_send.3 zmq_recv.3 zmq_send_const.3
\
zmq_msg_get.3 zmq_msg_set.3 zmq_msg_more.3
\
zmq_msg_get.3 zmq_msg_set.3 zmq_msg_more.3
zmq_msg_gets.3
\
zmq_getsockopt.3 zmq_setsockopt.3
\
zmq_socket.3 zmq_socket_monitor.3 zmq_poll.3
\
zmq_errno.3 zmq_strerror.3 zmq_version.3
\
...
...
doc/zmq_msg_gets.txt
0 → 100644
View file @
bf08114b
zmq_msg_gets(3)
===============
NAME
----
zmq_msg_gets - get message metadata property
SYNOPSIS
--------
*char *zmq_msg_gets (zmq_msg_t '*message', char *'property');*
DESCRIPTION
-----------
The _zmq_msg_gets()_ function shall return the string value for the metadata
property specified by the 'property' argument for the message pointed to by
the 'message' argument.
The following properties can be retrieved with the _zmq_msg_get()_ function:
RETURN VALUE
------------
The _zmq_msg_gets()_ function shall return the string value for the property
if successful. Otherwise it shall return NULL and set 'errno' to one of the
values defined below. The caller shall not modify or free the returned value,
which shall be owned by the message.
ERRORS
------
*EINVAL*::
The requested _property_ is unknown.
EXAMPLE
-------
.To be done
----
zmq_msg_t frame;
----
SEE ALSO
--------
linkzmq:zmq[7]
AUTHORS
-------
This page was written by the 0MQ community. To make a change please
read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.
include/zmq.h
View file @
bf08114b
...
...
@@ -216,8 +216,9 @@ 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_get
(
zmq_msg_t
*
msg
,
int
option
);
ZMQ_EXPORT
int
zmq_msg_set
(
zmq_msg_t
*
msg
,
int
option
,
int
optval
);
ZMQ_EXPORT
int
zmq_msg_get
(
zmq_msg_t
*
msg
,
int
property
);
ZMQ_EXPORT
int
zmq_msg_set
(
zmq_msg_t
*
msg
,
int
property
,
int
optval
);
ZMQ_EXPORT
char
*
zmq_msg_gets
(
zmq_msg_t
*
msg
,
char
*
property
);
/******************************************************************************/
...
...
src/zmq.cpp
View file @
bf08114b
...
...
@@ -620,9 +620,9 @@ int zmq_msg_more (zmq_msg_t *msg_)
return
zmq_msg_get
(
msg_
,
ZMQ_MORE
);
}
int
zmq_msg_get
(
zmq_msg_t
*
msg_
,
int
option
_
)
int
zmq_msg_get
(
zmq_msg_t
*
msg_
,
int
property
_
)
{
switch
(
option
_
)
{
switch
(
property
_
)
{
case
ZMQ_MORE
:
return
(((
zmq
::
msg_t
*
)
msg_
)
->
flags
()
&
zmq
::
msg_t
::
more
)
?
1
:
0
;
case
ZMQ_SRCFD
:
...
...
@@ -635,11 +635,20 @@ int zmq_msg_get (zmq_msg_t *msg_, int option_)
int
zmq_msg_set
(
zmq_msg_t
*
,
int
,
int
)
{
// No
option
s supported at present
// No
propertie
s supported at present
errno
=
EINVAL
;
return
-
1
;
}
// Get message metadata string
char
*
zmq_msg_gets
(
zmq_msg_t
*
msg_
,
char
*
property_
)
{
// All unknown properties return NULL
return
NULL
;
}
// Polling.
int
zmq_poll
(
zmq_pollitem_t
*
items_
,
int
nitems_
,
long
timeout_
)
...
...
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