blob: db2d09de3bcad3a0adcdf5458d0f744392524ff0 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GInetSocketAddress</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="networking.html" title="Lowlevel platform-independent network support">
<link rel="prev" href="GSocketAddress.html" title="GSocketAddress">
<link rel="next" href="GUnixSocketAddress.html" title="GUnixSocketAddress">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GSocketAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GUnixSocketAddress.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GInetSocketAddress.synopsis" class="shortcut">Top</a>
 | 
<a href="#GInetSocketAddress.description" class="shortcut">Description</a>
 | 
<a href="#GInetSocketAddress.object-hierarchy" class="shortcut">Object Hierarchy</a>
 | 
<a href="#GInetSocketAddress.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
 | 
<a href="#GInetSocketAddress.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry" title="GInetSocketAddress">
<a name="GInetSocketAddress"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GInetSocketAddress.top_of_page"></a>GInetSocketAddress</span></h2>
<p>GInetSocketAddress — Internet GSocketAddress</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="GInetSocketAddress.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"> <a class="link" href="GInetSocketAddress.html#GInetSocketAddress-struct" title="GInetSocketAddress">GInetSocketAddress</a>;
<a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> * <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-new" title="g_inet_socket_address_new ()">g_inet_socket_address_new</a> (<em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>);
<a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> * <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-get-address" title="g_inet_socket_address_get_address ()">g_inet_socket_address_get_address</a> (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-get-port" title="g_inet_socket_address_get_port ()">g_inet_socket_address_get_port</a> (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="GInetSocketAddress.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----<a class="link" href="GSocketAddress.html" title="GSocketAddress">GSocketAddress</a>
+----GInetSocketAddress
</pre>
</div>
<div class="refsect1" title="Implemented Interfaces">
<a name="GInetSocketAddress.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GInetSocketAddress implements
<a class="link" href="GSocketConnectable.html" title="GSocketConnectable">GSocketConnectable</a>.</p>
</div>
<div class="refsect1" title="Properties">
<a name="GInetSocketAddress.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--address" title='The "address" property'>address</a>" <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>* : Read / Write / Construct Only
"<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--port" title='The "port" property'>port</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" title="Description">
<a name="GInetSocketAddress.description"></a><h2>Description</h2>
<p>
An IPv4 or IPv6 socket address; that is, the combination of a
<a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> and a port number.
</p>
</div>
<div class="refsect1" title="Details">
<a name="GInetSocketAddress.details"></a><h2>Details</h2>
<div class="refsect2" title="GInetSocketAddress">
<a name="GInetSocketAddress-struct"></a><h3>GInetSocketAddress</h3>
<pre class="programlisting">typedef struct _GInetSocketAddress GInetSocketAddress;</pre>
<p>
An IPv4 or IPv6 socket address, corresponding to a <span class="type">struct
sockaddr_in</span> or <span class="type">struct sockaddr_in6</span>.
</p>
</div>
<hr>
<div class="refsect2" title="g_inet_socket_address_new ()">
<a name="g-inet-socket-address-new"></a><h3>g_inet_socket_address_new ()</h3>
<pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> * g_inet_socket_address_new (<em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>);</pre>
<p>
Creates a new <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> for <em class="parameter"><code>address</code></em> and <em class="parameter"><code>port</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
<td>a port number
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_inet_socket_address_get_address ()">
<a name="g-inet-socket-address-get-address"></a><h3>g_inet_socket_address_get_address ()</h3>
<pre class="programlisting"><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> * g_inet_socket_address_get_address (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);</pre>
<p>
Gets <em class="parameter"><code>address</code></em>'s <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> for <em class="parameter"><code>address</code></em>, which must be
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>'d if it will be stored
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_inet_socket_address_get_port ()">
<a name="g-inet-socket-address-get-port"></a><h3>g_inet_socket_address_get_port ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> g_inet_socket_address_get_port (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);</pre>
<p>
Gets <em class="parameter"><code>address</code></em>'s port.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
<td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the port for <em class="parameter"><code>address</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="GInetSocketAddress.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "address" property'>
<a name="GInetSocketAddress--address"></a><h3>The <code class="literal">"address"</code> property</h3>
<pre class="programlisting"> "address" <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>* : Read / Write / Construct Only</pre>
<p>The address.</p>
</div>
<hr>
<div class="refsect2" title='The "port" property'>
<a name="GInetSocketAddress--port"></a><h3>The <code class="literal">"port"</code> property</h3>
<pre class="programlisting"> "port" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre>
<p>The port.</p>
<p>Allowed values: &lt;= 65535</p>
<p>Default value: 0</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>