summaryrefslogtreecommitdiff
path: root/man/tip/nng_url.5.html
blob: ae3bcfda4c37b2f19853f23a0f3f1d6930879fb7 (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
---
version: tip
layout: manpage_v2
title: nng_url(5)
---
<h1>nng_url(5)</h1>
<div class="sect1">
<h2 id="_name">NAME</h2>
<div class="sectionbody">
<div class="paragraph">
<p>nng_url - Universal Resource Locator object</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;nng/nng.h&gt;</span>

<span class="tok-k">typedef</span><span class="tok-w"> </span><span class="tok-k">struct</span><span class="tok-w"> </span><span class="tok-nc">nng_url</span><span class="tok-w"> </span><span class="tok-p">{</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_rawurl</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_scheme</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_userinfo</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_host</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_hostname</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_port</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_path</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_query</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_fragment</span><span class="tok-p">;</span>
<span class="tok-w">    </span><span class="tok-kt">char</span><span class="tok-w"> </span><span class="tok-o">*</span><span class="tok-n">u_requri</span><span class="tok-p">;</span>
<span class="tok-p">}</span><span class="tok-w"> </span><span class="tok-n">nng_url</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>
An <code>nng_url</code> is a structure used for
representing URLs.
These structures are created by parsing string formatted URLs with
<a href="nng_url_parse.3.html"><code>nng_url_parse()</code></a>.</p>
</div>
<div class="paragraph">
<p>Applications may access individual fields, but must not free or
alter them, as the underlying memory is managed by the library.</p>
</div>
<div class="paragraph">
<p>The fields are as follows:</p>
</div>
<div class="hdlist">
<table>
<tr>
<td class="hdlist1">
<code>u_rawurl</code>
</td>
<td class="hdlist2">
<p>The unparsed URL string.  This will never be <code>NULL</code>.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_scheme</code>
</td>
<td class="hdlist2">
<p>The URL scheme, such as "http" or "inproc". Always lower case. This will never be <code>NULL</code>.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_userinfo</code>
</td>
<td class="hdlist2">
<p>This username and password if supplied in the URL string.  Will be <code>NULL</code> when not present.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_host</code>
</td>
<td class="hdlist2">
<p>The full host part of the URL, including the port if present (separated by a colon.)</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_hostname</code>
</td>
<td class="hdlist2">
<p>The name of the host, and may be the empty string in some cases.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_port</code>
</td>
<td class="hdlist2">
<p>The port.  May be empty if irrelevant or not specified.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_path</code>
</td>
<td class="hdlist2">
<p>The path, typically used with HTTP or WebSockets.  Will be empty string if not specified.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_query</code>
</td>
<td class="hdlist2">
<p>The query info (typically following <code>?</code> in the URL.)  Will be <code>NULL</code> if not present.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_fragment</code>
</td>
<td class="hdlist2">
<p>This is used for specifying an anchor, the part after <code>#</code> in a URL.  Will be <code>NULL</code> if not present.</p>
</td>
</tr>
<tr>
<td class="hdlist1">
<code>u_requri</code>
</td>
<td class="hdlist2">
<p>The full Request-URI  (path[?query][#fragment]). Will be the empty string if not specified.</p>
</td>
</tr>
</table>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Other fields may also be present, but only those documented here are safe for application use.
</td>
</tr>
</table>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
More information about Universal Resource Locators can be found in
<a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>.
</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="nng_url_clone.3.html">nng_url_clone(3)</a>,
<a href="nng_url_free.3.html">nng_url_free(3)</a>,
<a href="nng_url_parse.3.html">nng_url_parse(3)</a>,
<a href="nng.7.html">nng(7)</a></p>
</div>
</div>
</div>