summaryrefslogtreecommitdiff
path: root/man/tip/nn_errno.3compat.html
blob: aad816d62a1bcc5ffc442641da649cdb497e6ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
---
version: tip
layout: manpage_v2
title: nn_errno(3compat)
---
<h1>nn_errno(3compat)</h1>
<div class="sect1">
<h2 id="_name">NAME</h2>
<div class="sectionbody">
<div class="paragraph">
<p>nn_errno - return most recent error (compatible API)</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="c"><span></span><span class="tok-cp">#include</span><span class="tok-w"> </span><span class="tok-cpf">&lt;nanomsg/nn.h&gt;</span>

<span class="tok-kt">int</span><span class="tok-w"> </span><span class="tok-nf">nn_errno</span><span class="tok-p">(</span><span class="tok-kt">void</span><span class="tok-p">);</span></code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The <code>nn_errno()</code> function returns the error number corresponding to the
most recent failed operation by the calling thread.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
This function is provided for API
<a href="nng_compat.3compat.html">compatibility</a> with legacy <em>libnanomsg</em>.
Consider using the relevant <a href="libnng.3.html">modern API</a> instead.
</td>
</tr>
</table>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
The error numbers returned from this function may include
errors caused by system functions, which overlap the usual <code>errno</code> variable,
and this function simply returns the value of <code>errno</code>.
However, the values returned may include numeric values that are not
defined by the system, but are unique to <em>libnanomsg</em>, such as <code>EFSM</code>.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>This library implements the following error numbers, in addition to any others
that might be set for <code>errno</code> by the underlying system:</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_return_values">RETURN VALUES</h2>
<div class="sectionbody">
<div class="paragraph">
<p>This function returns the value of <code>errno</code>.
If no operation has failed, then this will be zero.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_errors">ERRORS</h2>
<div class="sectionbody">
<div class="hdlist">
<table>
<tr>
<td class="hdlist1">
<code>EINTR</code>
</td>
<td class="hdlist2">
<p>Operation interrupted.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ENOMEM</code>
</td>
<td class="hdlist2">
<p>Insufficient memory.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EINVAL</code>
</td>
<td class="hdlist2">
<p>Invalid argument.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EBUSY</code>
</td>
<td class="hdlist2">
<p>Resource is busy.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ETIMEDOUT</code>
</td>
<td class="hdlist2">
<p>Operation timed out.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ECONNREFUSED</code>
</td>
<td class="hdlist2">
<p>Connection refused by peer.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EBADF</code>
</td>
<td class="hdlist2">
<p>Invalid or closed socket.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EAGAIN</code>
</td>
<td class="hdlist2">
<p>Operation would block.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ENOTSUP</code>
</td>
<td class="hdlist2">
<p>Protocol or option not supported.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EADDRINUSE</code>
</td>
<td class="hdlist2">
<p>Requested address is already in use.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EFSM</code>
</td>
<td class="hdlist2">
<p>Protocol state incorrect.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EPROTO</code>
</td>
<td class="hdlist2">
<p>Protocol error.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EHOSTUNREACH</code>
</td>
<td class="hdlist2">
<p>Remote peer is unreachable.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EADDRNOTAVAIL</code>
</td>
<td class="hdlist2">
<p>Requested address is not available.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EACCES</code>
</td>
<td class="hdlist2">
<p>Permission denied.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EMSGSIZE</code>
</td>
<td class="hdlist2">
<p>Message is too large.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ECONNABORTED</code>
</td>
<td class="hdlist2">
<p>Connection attempt aborted.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ECONNRESET</code>
</td>
<td class="hdlist2">
<p>Connection reset by peer.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EEXIST</code>
</td>
<td class="hdlist2">
<p>Resource already exists.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>EMFILE</code>
</td>
<td class="hdlist2">
<p>Too many open files.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>ENOSPC</code>
</td>
<td class="hdlist2">
<p>Insufficient persistent storage.</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph text-left">
<p><a href="nn_strerror.3compat.html">nn_strerror(3compat)</a>,
<a href="nng_compat.3compat.html">nng_compat(3compat)</a>,
<a href="nng.7.html">nng(7)</a></p>
</div>
</div>
</div>