1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>glibmm 2.4: Gio::SocketAddress Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<body bgcolor="#ffffff">
7
<table border="0" width="100%">
9
<td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td>
10
<td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td>
14
<a class="qindex" href="http://www.gtkmm.org/documentation.shtml">Main Page</a>
15
<a class="qindex" href="namespaces.html">glibmm Namespaces</a>
16
<a href="../../../../gtkmm-2.4/docs/tutorial/html/index.html"> Book</a>
20
<!-- begin main content -->
22
<!-- Generated by Doxygen 1.5.6 -->
23
<div class="navpath"><a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1SocketAddress.html">SocketAddress</a>
25
<div class="contents">
26
<h1>Gio::SocketAddress Class Reference</h1><!-- doxytag: class="Gio::SocketAddress" --><!-- doxytag: inherits="Glib::Object,Gio::SocketConnectable" -->Abstract base class representing endpoints for socket communication.
27
<a href="#_details">More...</a>
29
<div class="dynheader">
30
Inheritance diagram for Gio::SocketAddress:</div>
31
<div class="dynsection">
32
<p><center><img src="classGio_1_1SocketAddress__inherit__graph.png" border="0" usemap="#Gio_1_1SocketAddress__inherit__map" alt="Inheritance graph"></center>
33
<map name="Gio_1_1SocketAddress__inherit__map">
34
<area shape="rect" href="classGio_1_1InetSocketAddress.html" title="Internet SocketAddress." alt="" coords="45,379,205,406"><area shape="rect" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="5,230,96,256"><area shape="rect" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="49,80,169,107"><area shape="rect" href="classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="133,155,237,182"><area shape="rect" href="classsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="56,6,163,32"><area shape="rect" href="classGio_1_1SocketConnectable.html" title="Interface for potential socket endpoints." alt="" coords="120,230,283,256"></map>
35
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
38
<a href="classGio_1_1SocketAddress-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
40
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
41
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#eedceaf982ff7e7dc75d419022bafde1">~SocketAddress</a> ()</td></tr>
43
<tr><td class="memItemLeft" nowrap align="right" valign="top">GSocketAddress* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#1f65b6f40eeb9a30eb613345be919eb6">gobj</a> ()</td></tr>
45
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#1f65b6f40eeb9a30eb613345be919eb6"></a><br></td></tr>
46
<tr><td class="memItemLeft" nowrap align="right" valign="top">const GSocketAddress* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#a2c5c7f04c127ad5037814f847ab2d6f">gobj</a> () const </td></tr>
48
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a2c5c7f04c127ad5037814f847ab2d6f"></a><br></td></tr>
49
<tr><td class="memItemLeft" nowrap align="right" valign="top">GSocketAddress* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#fe1a5b0091f024fa725ff31b88d01e7b">gobj_copy</a> ()</td></tr>
51
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#fe1a5b0091f024fa725ff31b88d01e7b"></a><br></td></tr>
52
<tr><td class="memItemLeft" nowrap align="right" valign="top">SocketFamily </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#b4fb1e63e629e88e5263e8bf5d095809">get_family</a> () const </td></tr>
54
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the socket family type of <em>address</em>. <a href="#b4fb1e63e629e88e5263e8bf5d095809"></a><br></td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#dec995b9e46746a5d55b3c5af592ec44">to_native</a> (gpointer dest, gsize destlen)</td></tr>
57
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts a <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication.">SocketAddress</a> to a native <type>struct sockaddr</type>, which can be passed to low-level functions like connect() or bind(). <a href="#dec995b9e46746a5d55b3c5af592ec44"></a><br></td></tr>
58
<tr><td class="memItemLeft" nowrap align="right" valign="top">gssize </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#25fd6c43478da2eef785467f75ba02ec">get_native_size</a> () const </td></tr>
60
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the size of <em>address's</em> native <type>struct sockaddr</type>. <a href="#25fd6c43478da2eef785467f75ba02ec"></a><br></td></tr>
61
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
62
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br>
63
<<a class="el" href="classGio_1_1SocketAddress.html">SocketAddress</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#3d2233d8fc6b47668d38d4b450b5bae2">create</a> (gpointer native, gsize len)</td></tr>
65
<tr><td colspan="2"><br><h2>Related Functions</h2></td></tr>
66
<tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1SocketAddress.html">Gio::SocketAddress</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SocketAddress.html#df0c2a59f4fc452b8b8e81f86ed1dc43">wrap</a> (GSocketAddress* object, bool take_copy=false)</td></tr>
69
<tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#df0c2a59f4fc452b8b8e81f86ed1dc43"></a><br></td></tr>
71
<hr><a name="_details"></a><h2>Detailed Description</h2>
72
Abstract base class representing endpoints for socket communication.
74
<hr><h2>Constructor & Destructor Documentation</h2>
75
<a class="anchor" name="eedceaf982ff7e7dc75d419022bafde1"></a><!-- doxytag: member="Gio::SocketAddress::~SocketAddress" ref="eedceaf982ff7e7dc75d419022bafde1" args="()" -->
77
<div class="memproto">
78
<table class="memname">
80
<td class="memname">virtual Gio::SocketAddress::~SocketAddress </td>
82
<td class="paramname"> </td>
83
<td> ) </td>
84
<td><code> [virtual]</code></td>
94
<hr><h2>Member Function Documentation</h2>
95
<a class="anchor" name="1f65b6f40eeb9a30eb613345be919eb6"></a><!-- doxytag: member="Gio::SocketAddress::gobj" ref="1f65b6f40eeb9a30eb613345be919eb6" args="()" -->
97
<div class="memproto">
98
<table class="memname">
100
<td class="memname">GSocketAddress* Gio::SocketAddress::gobj </td>
102
<td class="paramname"> </td>
103
<td> ) </td>
104
<td><code> [inline]</code></td>
111
Provides access to the underlying C GObject.
114
<p>Reimplemented from <a class="el" href="classGio_1_1SocketConnectable.html#25988d9aeb115345500d09b282cf7023">Gio::SocketConnectable</a>.</p>
116
<p>Reimplemented in <a class="el" href="classGio_1_1InetSocketAddress.html#2185ff490fa658c11854df16c41910dc">Gio::InetSocketAddress</a>.</p>
120
<a class="anchor" name="a2c5c7f04c127ad5037814f847ab2d6f"></a><!-- doxytag: member="Gio::SocketAddress::gobj" ref="a2c5c7f04c127ad5037814f847ab2d6f" args="() const " -->
121
<div class="memitem">
122
<div class="memproto">
123
<table class="memname">
125
<td class="memname">const GSocketAddress* Gio::SocketAddress::gobj </td>
127
<td class="paramname"> </td>
128
<td> ) </td>
129
<td> const<code> [inline]</code></td>
136
Provides access to the underlying C GObject.
139
<p>Reimplemented from <a class="el" href="classGio_1_1SocketConnectable.html#5ba8bd26578fa49ce4a6f8fbb544858c">Gio::SocketConnectable</a>.</p>
141
<p>Reimplemented in <a class="el" href="classGio_1_1InetSocketAddress.html#d0a057e46b10504010e3e014d3207f4d">Gio::InetSocketAddress</a>.</p>
145
<a class="anchor" name="fe1a5b0091f024fa725ff31b88d01e7b"></a><!-- doxytag: member="Gio::SocketAddress::gobj_copy" ref="fe1a5b0091f024fa725ff31b88d01e7b" args="()" -->
146
<div class="memitem">
147
<div class="memproto">
148
<table class="memname">
150
<td class="memname">GSocketAddress* Gio::SocketAddress::gobj_copy </td>
152
<td class="paramname"> </td>
153
<td> ) </td>
161
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
164
<p>Reimplemented in <a class="el" href="classGio_1_1InetSocketAddress.html#0d165726f19e26d3c03a184510b6df2b">Gio::InetSocketAddress</a>.</p>
168
<a class="anchor" name="3d2233d8fc6b47668d38d4b450b5bae2"></a><!-- doxytag: member="Gio::SocketAddress::create" ref="3d2233d8fc6b47668d38d4b450b5bae2" args="(gpointer native, gsize len)" -->
169
<div class="memitem">
170
<div class="memproto">
171
<table class="memname">
173
<td class="memname">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1SocketAddress.html">SocketAddress</a>> Gio::SocketAddress::create </td>
175
<td class="paramtype">gpointer </td>
176
<td class="paramname"> <em>native</em>, </td>
179
<td class="paramkey"></td>
181
<td class="paramtype">gsize </td>
182
<td class="paramname"> <em>len</em></td><td> </td>
187
<td></td><td></td><td><code> [static]</code></td>
197
<a class="anchor" name="b4fb1e63e629e88e5263e8bf5d095809"></a><!-- doxytag: member="Gio::SocketAddress::get_family" ref="b4fb1e63e629e88e5263e8bf5d095809" args="() const " -->
198
<div class="memitem">
199
<div class="memproto">
200
<table class="memname">
202
<td class="memname">SocketFamily Gio::SocketAddress::get_family </td>
204
<td class="paramname"> </td>
205
<td> ) </td>
213
Gets the socket family type of <em>address</em>.
215
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The socket family type of <em>address</em>.</dd></dl>
219
<a class="anchor" name="dec995b9e46746a5d55b3c5af592ec44"></a><!-- doxytag: member="Gio::SocketAddress::to_native" ref="dec995b9e46746a5d55b3c5af592ec44" args="(gpointer dest, gsize destlen)" -->
220
<div class="memitem">
221
<div class="memproto">
222
<table class="memname">
224
<td class="memname">bool Gio::SocketAddress::to_native </td>
226
<td class="paramtype">gpointer </td>
227
<td class="paramname"> <em>dest</em>, </td>
230
<td class="paramkey"></td>
232
<td class="paramtype">gsize </td>
233
<td class="paramname"> <em>destlen</em></td><td> </td>
238
<td></td><td></td><td></td>
245
Converts a <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication.">SocketAddress</a> to a native <type>struct sockaddr</type>, which can be passed to low-level functions like connect() or bind().
247
<dl compact><dt><b>Parameters:</b></dt><dd>
248
<table border="0" cellspacing="2" cellpadding="0">
249
<tr><td valign="top"></td><td valign="top"><em>dest</em> </td><td>A pointer to a memory location that will contain the native <type>struct sockaddr</type>. </td></tr>
250
<tr><td valign="top"></td><td valign="top"><em>destlen</em> </td><td>The size of <em>dest</em>. Must be at least as large as g_socket_address_get_native_size(). </td></tr>
253
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if <em>dest</em> was filled in, <code>false</code> if <em>address</em> is invalid or <em>destlen</em> is too small.</dd></dl>
257
<a class="anchor" name="25fd6c43478da2eef785467f75ba02ec"></a><!-- doxytag: member="Gio::SocketAddress::get_native_size" ref="25fd6c43478da2eef785467f75ba02ec" args="() const " -->
258
<div class="memitem">
259
<div class="memproto">
260
<table class="memname">
262
<td class="memname">gssize Gio::SocketAddress::get_native_size </td>
264
<td class="paramname"> </td>
265
<td> ) </td>
273
Gets the size of <em>address's</em> native <type>struct sockaddr</type>.
275
You can use this to allocate memory to pass to g_socket_address_to_native(). <dl class="return" compact><dt><b>Returns:</b></dt><dd>The size of the native <type>struct sockaddr</type> that <em>address</em> represents</dd></dl>
279
<hr><h2>Friends And Related Function Documentation</h2>
280
<a class="anchor" name="df0c2a59f4fc452b8b8e81f86ed1dc43"></a><!-- doxytag: member="Gio::SocketAddress::wrap" ref="df0c2a59f4fc452b8b8e81f86ed1dc43" args="(GSocketAddress *object, bool take_copy=false)" -->
281
<div class="memitem">
282
<div class="memproto">
283
<table class="memname">
285
<td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1SocketAddress.html">Gio::SocketAddress</a>> wrap </td>
287
<td class="paramtype">GSocketAddress * </td>
288
<td class="paramname"> <em>object</em>, </td>
291
<td class="paramkey"></td>
293
<td class="paramtype">bool </td>
294
<td class="paramname"> <em>take_copy</em> = <code>false</code></td><td> </td>
299
<td></td><td></td><td><code> [related]</code></td>
306
A <a class="el" href="namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object.
308
<dl compact><dt><b>Parameters:</b></dt><dd>
309
<table border="0" cellspacing="2" cellpadding="0">
310
<tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr>
311
<tr><td valign="top"></td><td valign="top"><em>take_copy</em> </td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
314
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>
318
<hr>The documentation for this class was generated from the following file:<ul>
319
<li><a class="el" href="socketaddress_8h.html">socketaddress.h</a></ul>
321
</div> <!-- end main content -->
324
Generated for glibmm 2.4 by <a href="http://www.doxygen.org/index.html">
325
Doxygen</a> 1.5.6 © 1997-2001</small></address>