403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/gtk-doc/html/gio/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/gtk-doc/html/gio/GSocketService.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GSocketService</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="highlevel-socket.html" title="Highlevel network functionallity">
<link rel="prev" href="GSocketListener.html" title="GSocketListener">
<link rel="next" href="GThreadedSocketService.html" title="GThreadedSocketService">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part I. GIO Overview">
<link rel="chapter" href="ch01.html" title="Introduction">
<link rel="chapter" href="ch02.html" title="Compiling GIO applications">
<link rel="chapter" href="ch03.html" title="Running GIO applications">
<link rel="chapter" href="extending-gio.html" title="Extending GIO">
<link rel="part" href="pt02.html" title="Part II. API Reference">
<link rel="chapter" href="file_ops.html" title="File Operations">
<link rel="chapter" href="file_mon.html" title="File System Monitoring">
<link rel="chapter" href="async.html" title="Asynchronous I/O">
<link rel="chapter" href="streaming.html" title="Streaming I/O">
<link rel="chapter" href="types.html" title="File types and applications">
<link rel="chapter" href="volume_mon.html" title="Volumes and Drives">
<link rel="chapter" href="icons.html" title="Icons">
<link rel="chapter" href="failable_initialization.html" title="Failable Initialization">
<link rel="chapter" href="networking.html" title="Lowlevel platform-independent network support">
<link rel="chapter" href="resolver.html" title="DNS resolution">
<link rel="chapter" href="highlevel-socket.html" title="Highlevel network functionallity">
<link rel="chapter" href="utils.html" title="Utilities">
<link rel="chapter" href="extending.html" title="Extending GIO">
<link rel="part" href="migrating.html" title="Part III. Migrating to GIO">
<link rel="chapter" href="ch18.html" title="Migrating from POSIX to GIO">
<link rel="chapter" href="ch19.html" title="Migrating from GnomeVFS to GIO">
<link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.18">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.20">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.22">
</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="GSocketListener.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="highlevel-socket.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="GThreadedSocketService.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GSocketService.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#GSocketService.description" class="shortcut">Description</a>
                 | 
                <a href="#GSocketService.object-hierarchy" class="shortcut">Object Hierarchy</a>
                 | 
                <a href="#GSocketService.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="GSocketService">
<a name="GSocketService"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GSocketService.top_of_page"></a>GSocketService</span></h2>
<p>GSocketService — Make it easy to implement a network service</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="GSocketService.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
                    <a class="link" href="GSocketService.html#GSocketService-struct" title="GSocketService">GSocketService</a>;
<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *    <a class="link" href="GSocketService.html#g-socket-service-new" title="g_socket_service_new ()">g_socket_service_new</a>                (void);
void                <a class="link" href="GSocketService.html#g-socket-service-start" title="g_socket_service_start ()">g_socket_service_start</a>              (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *service);
void                <a class="link" href="GSocketService.html#g-socket-service-stop" title="g_socket_service_stop ()">g_socket_service_stop</a>               (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *service);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="GSocketService.html#g-socket-service-is-active" title="g_socket_service_is_active ()">g_socket_service_is_active</a>          (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *service);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="GSocketService.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a class="link" href="GSocketListener.html" title="GSocketListener">GSocketListener</a>
         +----GSocketService
               +----<a class="link" href="GThreadedSocketService.html" title="GThreadedSocketService">GThreadedSocketService</a>
</pre>
</div>
<div class="refsect1" title="Signals">
<a name="GSocketService.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GSocketService.html#GSocketService-incoming" title='The "incoming" signal'>incoming</a>"                                       : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="GSocketService.description"></a><h2>Description</h2>
<p>
A <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a> is an object that represents a service that is
provided to the network or over local sockets.  When a new
connection is made to the service the <span class="type">"incoming"</span>
signal is emitted.
</p>
<p>
A <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a> is a subclass of <a class="link" href="GSocketListener.html" title="GSocketListener"><span class="type">GSocketListener</span></a> and you need
to add the addresses you want to accept connections on to the
with the <a class="link" href="GSocketListener.html" title="GSocketListener"><span class="type">GSocketListener</span></a> APIs.
</p>
<p>
There are two options for implementing a network service based on
<a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a>. The first is to create the service using
<a class="link" href="GSocketService.html#g-socket-service-new" title="g_socket_service_new ()"><code class="function">g_socket_service_new()</code></a> and to connect to the <span class="type">"incoming"</span>
signal. The second is to subclass <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a> and override the
default signal handler implementation.
</p>
<p>
In either case, the handler must immediately return, or else it
will block additional incoming connections from being serviced.
If you are interested in writing connection handlers that contain
blocking code then see <a class="link" href="GThreadedSocketService.html" title="GThreadedSocketService"><span class="type">GThreadedSocketService</span></a>.
</p>
<p>
The socket service runs on the main loop in the main thread, and is
not threadsafe in general. However, the calls to start and stop
the service are threadsafe so these can be used from threads that
handle incoming clients.</p>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="GSocketService.details"></a><h2>Details</h2>
<div class="refsect2" title="GSocketService">
<a name="GSocketService-struct"></a><h3>GSocketService</h3>
<pre class="programlisting">typedef struct _GSocketService GSocketService;</pre>
<p>
A helper class for handling accepting incomming connections in the
glib mainloop.</p>
<p>
</p>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_socket_service_new ()">
<a name="g-socket-service-new"></a><h3>g_socket_service_new ()</h3>
<pre class="programlisting"><a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *    g_socket_service_new                (void);</pre>
<p>
Creates a new <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a> with no sockets to listen for.
New listeners can be added with e.g. <a class="link" href="GSocketListener.html#g-socket-listener-add-address" title="g_socket_listener_add_address ()"><code class="function">g_socket_listener_add_address()</code></a>
or <a class="link" href="GSocketListener.html#g-socket-listener-add-inet-port" title="g_socket_listener_add_inet_port ()"><code class="function">g_socket_listener_add_inet_port()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a>.

</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_socket_service_start ()">
<a name="g-socket-service-start"></a><h3>g_socket_service_start ()</h3>
<pre class="programlisting">void                g_socket_service_start              (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *service);</pre>
<p>
Starts the service, i.e. start accepting connections
from the added sockets when the mainloop runs.
</p>
<p>
This call is threadsafe, so it may be called from a thread
handling an incomming client request.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
<td> a <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_socket_service_stop ()">
<a name="g-socket-service-stop"></a><h3>g_socket_service_stop ()</h3>
<pre class="programlisting">void                g_socket_service_stop               (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *service);</pre>
<p>
Stops the service, i.e. stops accepting connections
from the added sockets when the mainloop runs.
</p>
<p>
This call is threadsafe, so it may be called from a thread
handling an incomming client request.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
<td> a <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2" title="g_socket_service_is_active ()">
<a name="g-socket-service-is-active"></a><h3>g_socket_service_is_active ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a>            g_socket_service_is_active          (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a> *service);</pre>
<p>
Check whether the service is active or not. An active
service will accept new clients that connect, while
a non-active service will let connecting clients queue
up until the service is started.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
<td> a <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if the service is active, <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
><code class="literal">FALSE</code></a> otherwise

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="GSocketService.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "incoming" signal'>
<a name="GSocketService-incoming"></a><h3>The <code class="literal">"incoming"</code> signal</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a>            user_function                      (<a class="link" href="GSocketService.html" title="GSocketService">GSocketService</a>    *service,
                                                        <a class="link" href="GSocketConnection.html" title="GSocketConnection">GSocketConnection</a> *connection,
                                                        <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>           *source_object,
                                                        <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a>           user_data)          : Run Last</pre>
<p>
The ::incoming signal is emitted when a new incoming connection
to <em class="parameter"><code>service</code></em> needs to be handled. The handler must initiate the
handling of <em class="parameter"><code>connection</code></em>, but may not block; in essence,
asynchronous operations must be used.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>service</code></em> :</span></p></td>
<td> the <a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td> a new <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>source_object</code></em> :</span></p></td>
<td> the source_object passed to <a class="link" href="GSocketListener.html#g-socket-listener-add-address" title="g_socket_listener_add_address ()"><code class="function">g_socket_listener_add_address()</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> to stop other handlers from being called
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.22</p>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="GSocketService.see-also"></a><h2>See Also</h2>
#GThreadedSocketService, <a class="link" href="GSocketListener.html" title="GSocketListener"><span class="type">GSocketListener</span></a>.
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit