~ubuntu-branches/ubuntu/saucy/zeromq3/saucy

« back to all changes in this revision

Viewing changes to doc/zmq_msg_copy.txt

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-06-04 21:21:09 UTC
  • Revision ID: package-import@ubuntu.com-20120604212109-b7b3m0rn21o8oo2q
Tags: upstream-3.1.0~beta+dfsg
ImportĀ upstreamĀ versionĀ 3.1.0~beta+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
zmq_msg_copy(3)
 
2
===============
 
3
 
 
4
 
 
5
NAME
 
6
----
 
7
zmq_msg_copy - copy content of a message to another message
 
8
 
 
9
 
 
10
SYNOPSIS
 
11
--------
 
12
*int zmq_msg_copy (zmq_msg_t '*dest', zmq_msg_t '*src');*
 
13
 
 
14
 
 
15
DESCRIPTION
 
16
-----------
 
17
The _zmq_msg_copy()_ function shall copy the message object referenced by 'src'
 
18
to the message object referenced by 'dest'. The original content of 'dest', if
 
19
any, shall be released.
 
20
 
 
21
CAUTION: The implementation may choose not to physically copy the message
 
22
content, rather to share the underlying buffer between 'src' and 'dest'. Avoid
 
23
modifying message content after a message has been copied with
 
24
_zmq_msg_copy()_, doing so can result in undefined behaviour. If what you need
 
25
is an actual hard copy, allocate a new message using _zmq_msg_init_size()_ and
 
26
copy the message content using _memcpy()_.
 
27
 
 
28
CAUTION: Never access 'zmq_msg_t' members directly, instead always use the
 
29
_zmq_msg_ family of functions.
 
30
 
 
31
 
 
32
RETURN VALUE
 
33
------------
 
34
The _zmq_msg_copy()_ function shall return zero if successful. Otherwise it
 
35
shall return `-1` and set 'errno' to one of the values defined below.
 
36
 
 
37
 
 
38
ERRORS
 
39
------
 
40
*EFAULT*::
 
41
Invalid message.
 
42
 
 
43
 
 
44
SEE ALSO
 
45
--------
 
46
linkzmq:zmq_msg_move[3]
 
47
linkzmq:zmq_msg_init[3]
 
48
linkzmq:zmq_msg_init_size[3]
 
49
linkzmq:zmq_msg_init_data[3]
 
50
linkzmq:zmq_msg_close[3]
 
51
linkzmq:zmq[7]
 
52
 
 
53
 
 
54
AUTHORS
 
55
-------
 
56
The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
 
57
Martin Lucina <martin@lucina.net>.