| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
<!DOCTYPE html> |
| 8 |
<html lang="en"> |
| 9 |
<head> |
| 10 |
<title>GSSDP.Client.new_for_address</title> |
| 11 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 12 |
|
| 13 |
<meta charset="utf-8" /> |
| 14 |
|
| 15 |
|
| 16 |
<meta property="og:type" content="website"/> |
| 17 |
|
| 18 |
|
| 19 |
<meta property="og:image:width" content="256"/> |
| 20 |
<meta property="og:image:height" content="256"/> |
| 21 |
<meta property="og:image:secure_url" content="gupnp-logo-short.svg"/> |
| 22 |
<meta property="og:image:alt" content="GSSDP-1.6"/> |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
<meta property="og:title" content="GSSDP.Client.new_for_address"/> |
| 27 |
<meta property="og:description" content="Reference for GSSDP.Client.new_for_address"/> |
| 28 |
<meta name="twitter:title" content="GSSDP.Client.new_for_address"/> |
| 29 |
<meta name="twitter:description" content="Reference for GSSDP.Client.new_for_address"/> |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
<meta name="twitter:card" content="summary"/> |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
<link rel="stylesheet" href="style.css" type="text/css" /> |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
<script src="urlmap.js"></script> |
| 46 |
|
| 47 |
|
| 48 |
<script src="fzy.js"></script> |
| 49 |
<script src="search.js"></script> |
| 50 |
|
| 51 |
<script src="main.js"></script> |
| 52 |
|
| 53 |
|
| 54 |
</head> |
| 55 |
|
| 56 |
<body> |
| 57 |
<div id="body-wrapper" tabindex="-1"> |
| 58 |
|
| 59 |
<nav class="sidebar devhelp-hidden"> |
| 60 |
|
| 61 |
<div class="section"> |
| 62 |
<a href="index.html"><img src="gupnp-logo-short.svg" class="logo"/></a> |
| 63 |
</div> |
| 64 |
|
| 65 |
|
| 66 |
<div class="search section"> |
| 67 |
<form id="search-form" autocomplete="off"> |
| 68 |
<input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/> |
| 69 |
</form> |
| 70 |
</div> |
| 71 |
|
| 72 |
<div class="section namespace"> |
| 73 |
<h3><a href="index.html">GSSDP</a></h3> |
| 74 |
<p>API Version: 1.6</p> |
| 75 |
|
| 76 |
<p>Library Version: 1.6.6</p> |
| 77 |
|
| 78 |
</div> |
| 79 |
|
| 80 |
<div class="section"> |
| 81 |
<h5>Type</h5> |
| 82 |
<div class="links"> |
| 83 |
<a href="class.Client.html">Client</a> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
<div class="section"> |
| 87 |
<h5>Constructors</h5> |
| 88 |
<div class="links"> |
| 89 |
|
| 90 |
<a class="method" href="ctor.Client.new.html">new</a> |
| 91 |
|
| 92 |
<a class="method current" href="ctor.Client.new_for_address.html">new_for_address</a> |
| 93 |
|
| 94 |
<a class="method" href="ctor.Client.new_full.html">new_full</a> |
| 95 |
|
| 96 |
<a class="method" href="ctor.Client.new_with_port.html">new_with_port</a> |
| 97 |
|
| 98 |
</div> |
| 99 |
</div> |
| 100 |
|
| 101 |
<div class="section generator"> |
| 102 |
<p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2026.1</p> |
| 103 |
</div> |
| 104 |
</nav> |
| 105 |
|
| 106 |
<button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button> |
| 107 |
|
| 108 |
|
| 109 |
<section id="main" class="content"> |
| 110 |
<header> |
| 111 |
<h3>Constructor</h3> |
| 112 |
<h1><a href="index.html">GSSDP</a><span class="sep"></span><a href="class.Client.html">Client</a><span class="sep"></span>new_for_address</h1> |
| 113 |
</header> |
| 114 |
|
| 115 |
<section> |
| 116 |
<div class="docblock"> |
| 117 |
<p><span class="emblem available">since: 1.6.0</span></p> |
| 118 |
</div> |
| 119 |
<div class="declaration toggle-wrapper"> |
| 120 |
<h4 id="declaration" style="display:flex;"> |
| 121 |
Declaration |
| 122 |
<a href="#declaration" class="anchor"></a> |
| 123 |
|
| 124 |
<a class="srclink" title="go to source location" href="https://gitlab.gnome.org/GNOME/gssdp/-/blob/libgssdp/gssdp-client.h#L62">[src]</a> |
| 125 |
|
| 126 |
</h4> |
| 127 |
|
| 128 |
<div class="docblock"> |
| 129 |
<pre><code><div class="highlight"><pre><span></span><span class="n">GSSDPClient</span><span class="o">*</span> |
| 130 |
<span class="n">gssdp_client_new_for_address</span><span class="w"> </span><span class="p">(</span> |
| 131 |
<span class="w"> </span><span class="n">GInetAddress</span><span class="o">*</span><span class="w"> </span><span class="n">addr</span><span class="p">,</span> |
| 132 |
<span class="w"> </span><span class="n">guint16</span><span class="w"> </span><span class="n">port</span><span class="p">,</span> |
| 133 |
<span class="w"> </span><span class="n">GSSDPUDAVersion</span><span class="w"> </span><span class="n">uda_version</span><span class="p">,</span> |
| 134 |
<span class="w"> </span><span class="n">GError</span><span class="o">**</span><span class="w"> </span><span class="n">error</span> |
| 135 |
<span class="p">)</span> |
| 136 |
</pre></div> |
| 137 |
</code></pre> |
| 138 |
</div> |
| 139 |
</div> |
| 140 |
|
| 141 |
<div class="description toggle-wrapper"> |
| 142 |
<h4 id="description" style="display:flex;"> |
| 143 |
Description |
| 144 |
<a href="#description" class="anchor"></a> |
| 145 |
|
| 146 |
<a class="srclink" title="go to source location" href="https://gitlab.gnome.org/GNOME/gssdp/-/blob/libgssdp/gssdp-client.c#L920">[src]</a> |
| 147 |
|
| 148 |
</h4> |
| 149 |
|
| 150 |
<div class="docblock"> |
| 151 |
<p>Creates a <span class="caps">GSSDP</span> client with address <code>addr</code>. If none is specified, <span class="caps">GSSDP</span> |
| 152 |
will chose the address it deems most suitable.</p> |
| 153 |
</div> |
| 154 |
|
| 155 |
<div class="docblock"> |
| 156 |
|
| 157 |
<p>Available since: 1.6.0</p> |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
</div> |
| 164 |
|
| 165 |
|
| 166 |
</div> |
| 167 |
|
| 168 |
|
| 169 |
<div class="parameters toggle-wrapper"> |
| 170 |
<h4 id="parameters"> |
| 171 |
Parameters |
| 172 |
<a href="#parameters" class="anchor"></a> |
| 173 |
</h4> |
| 174 |
|
| 175 |
<div class="docblock"> |
| 176 |
<dl class="arguments"> |
| 177 |
|
| 178 |
<dt class="arg-name"><code>addr</code></dt> |
| 179 |
<dd class="arg-description"> |
| 180 |
<p><em>Type:</em> <a href="javascript:void(0)" data-link="class.InetAddress.html" data-namespace="Gio" class="external"><code>GInetAddress</code></a></p> |
| 181 |
<p>An <span class="caps">IP</span> address or <code>NULL</code> for auto-detection. If you do not |
| 182 |
care about the address, but want to specify an address family, use |
| 183 |
Glib.InetAddress.new_any with the appropriate family instead.</p> |
| 184 |
<table> |
| 185 |
|
| 186 |
<tr><td>The argument can be <code>NULL</code>.</td></tr> |
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
<tr><td title="transfer: none">The data is owned by the caller of the function.</td></tr> |
| 193 |
|
| 194 |
</table> |
| 195 |
</dd> |
| 196 |
|
| 197 |
<dt class="arg-name"><code>port</code></dt> |
| 198 |
<dd class="arg-description"> |
| 199 |
<p><em>Type:</em> <code>guint16</code></p> |
| 200 |
<p>The network port to use for M-<span class="caps">SEARCH</span> requests or 0 for random.</p> |
| 201 |
<table> |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
</table> |
| 212 |
</dd> |
| 213 |
|
| 214 |
<dt class="arg-name"><code>uda_version</code></dt> |
| 215 |
<dd class="arg-description"> |
| 216 |
<p><em>Type:</em> <a href="enum.UDAVersion.html"><code>GSSDPUDAVersion</code></a></p> |
| 217 |
<p>The <span class="caps">UDA</span> version this client will adhere to.</p> |
| 218 |
<table> |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
</table> |
| 229 |
</dd> |
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
<dt class="arg-name"><code>error</code></dt> |
| 234 |
<dd class="arg-description"> |
| 235 |
<p><em>Type:</em> <a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p> |
| 236 |
<p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p> |
| 237 |
<table> |
| 238 |
<tr><td>The argument can be <code>NULL</code>.</td></tr> |
| 239 |
<tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr> |
| 240 |
<tr><td>The argument will be left initialized to <code>NULL</code> by the constructor if there are no errors.</td></tr> |
| 241 |
<tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr> |
| 242 |
</table> |
| 243 |
</dd> |
| 244 |
|
| 245 |
</dl> |
| 246 |
</div> |
| 247 |
</div> |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
<div class="return-value toggle-wrapper"> |
| 252 |
<h4 id="return-value"> |
| 253 |
Return value |
| 254 |
<a href="#return-value" class="anchor"></a> |
| 255 |
</h4> |
| 256 |
|
| 257 |
<div class="docblock"> |
| 258 |
<div class="returns"> |
| 259 |
<div class="arg-description"> |
| 260 |
<p><em>Type:</em> <a href="class.Client.html"><code>GSSDPClient</code></a></p> |
| 261 |
<p>A new <code>GSSDPClient</code> object or <code>NULL</code> on error.</p> |
| 262 |
</div> |
| 263 |
<div> |
| 264 |
<table> |
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
<tr><td title="transfer: full">The caller of the function takes ownership of the data, and is responsible for freeing it.</td></tr> |
| 269 |
<tr><td>The return value can be <code>NULL</code>.</td></tr> |
| 270 |
|
| 271 |
</table> |
| 272 |
</div> |
| 273 |
</div> |
| 274 |
</div> |
| 275 |
</div> |
| 276 |
|
| 277 |
</section> |
| 278 |
</section> |
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
<section id="search" class="content hidden"></section> |
| 284 |
|
| 285 |
<footer> |
| 286 |
|
| 287 |
</footer> |
| 288 |
</div> |
| 289 |
</body> |
| 290 |
</html> |