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

« back to all changes in this revision

Viewing changes to doc/zmq_msg_init_size.3

  • 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
'\" t
 
2
.\"     Title: zmq_msg_init_size
 
3
.\"    Author: [see the "AUTHORS" section]
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
 
5
.\"      Date: 12/18/2011
 
6
.\"    Manual: 0MQ Manual
 
7
.\"    Source: 0MQ 3.1.0
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "ZMQ_MSG_INIT_SIZE" "3" "12/18/2011" "0MQ 3\&.1\&.0" "0MQ Manual"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * Define some portability stuff
 
13
.\" -----------------------------------------------------------------
 
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
15
.\" http://bugs.debian.org/507673
 
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
 
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
18
.ie \n(.g .ds Aq \(aq
 
19
.el       .ds Aq '
 
20
.\" -----------------------------------------------------------------
 
21
.\" * set default formatting
 
22
.\" -----------------------------------------------------------------
 
23
.\" disable hyphenation
 
24
.nh
 
25
.\" disable justification (adjust text to left margin only)
 
26
.ad l
 
27
.\" -----------------------------------------------------------------
 
28
.\" * MAIN CONTENT STARTS HERE *
 
29
.\" -----------------------------------------------------------------
 
30
.SH "NAME"
 
31
zmq_msg_init_size \- initialise 0MQ message of a specified size
 
32
.SH "SYNOPSIS"
 
33
.sp
 
34
\fBint zmq_msg_init_size (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB);\fR
 
35
.SH "DESCRIPTION"
 
36
.sp
 
37
The \fIzmq_msg_init_size()\fR function shall allocate any resources required to store a message \fIsize\fR bytes long and initialise the message object referenced by \fImsg\fR to represent the newly allocated message\&.
 
38
.sp
 
39
The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages)\&. For performance reasons \fIzmq_msg_init_size()\fR shall not clear the message data\&.
 
40
.if n \{\
 
41
.sp
 
42
.\}
 
43
.RS 4
 
44
.it 1 an-trap
 
45
.nr an-no-space-flag 1
 
46
.nr an-break-flag 1
 
47
.br
 
48
.ps +1
 
49
\fBCaution\fR
 
50
.ps -1
 
51
.br
 
52
.sp
 
53
Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&.
 
54
.sp .5v
 
55
.RE
 
56
.if n \{\
 
57
.sp
 
58
.\}
 
59
.RS 4
 
60
.it 1 an-trap
 
61
.nr an-no-space-flag 1
 
62
.nr an-break-flag 1
 
63
.br
 
64
.ps +1
 
65
\fBCaution\fR
 
66
.ps -1
 
67
.br
 
68
.sp
 
69
The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&.
 
70
.sp .5v
 
71
.RE
 
72
.SH "RETURN VALUE"
 
73
.sp
 
74
The \fIzmq_msg_init_size()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
 
75
.SH "ERRORS"
 
76
.PP
 
77
\fBENOMEM\fR
 
78
.RS 4
 
79
Insufficient storage space is available\&.
 
80
.RE
 
81
.SH "SEE ALSO"
 
82
.sp
 
83
\fBzmq_msg_init_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7)
 
84
.SH "AUTHORS"
 
85
.sp
 
86
The 0MQ documentation was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmartin@lucina\&.net\fR\m[]\&\s-2\u[2]\d\s+2>\&.
 
87
.SH "NOTES"
 
88
.IP " 1." 4
 
89
sustrik@250bpm.com
 
90
.RS 4
 
91
\%mailto:sustrik@250bpm.com
 
92
.RE
 
93
.IP " 2." 4
 
94
martin@lucina.net
 
95
.RS 4
 
96
\%mailto:martin@lucina.net
 
97
.RE