Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4442dd9bdde98a1d9ca2177557e87d7d > files > 613

libqxt-devel-0.6.1-3.fc15.i686.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /builddir/build/BUILD/libqxt/src/network/qxttcpconnectionmanager.cpp -->
<head>
  <title>QxtTcpConnectionManager Class Reference</title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://libqxt.org"><img src="images/qxt-logo.png" width="50" height="40" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">Classes</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">Namespaces</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QxtTcpConnectionManager Class Reference<br /><span class="small-subtitle">[<a href="qxtnetwork.html">QxtNetwork</a> module]</span>
</h1>
<p>The QxtTcpConnectionManager class accepts TCP connections and maintains a connection pool <a href="#details">More...</a></p>
<pre>    #include &lt;QxtTcpConnectionManager&gt;</pre><p>Inherits <a href="qxtabstractconnectionmanager.html">QxtAbstractConnectionManager</a>.</p>
<ul>
<li><a href="qxttcpconnectionmanager-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"></div><b><a href="qxttcpconnectionmanager.html#QxtTcpConnectionManager">QxtTcpConnectionManager</a></b> ( QObject * <i>parent</i> )</li>
<li><div class="fn"></div>bool <b><a href="qxttcpconnectionmanager.html#listen">listen</a></b> ( QHostAddress <i>iface</i> = QHostAddress::Any, int <i>port</i> = 80 )</li>
<li><div class="fn"></div>QNetworkProxy <b><a href="qxttcpconnectionmanager.html#proxy">proxy</a></b> () const</li>
<li><div class="fn"></div>void <b><a href="qxttcpconnectionmanager.html#setProxy">setProxy</a></b> ( const QNetworkProxy &amp; <i>proxy</i> )</li>
<li><div class="fn"></div>void <b><a href="qxttcpconnectionmanager.html#stopListening">stopListening</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"></div>3 public functions inherited from <a href="qxtabstractconnectionmanager.html#public-functions">QxtAbstractConnectionManager</a></li>
<li><div class="fn"></div>29 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h3>Protected Functions</h3>
<ul>
<li><div class="fn"></div>virtual QIODevice * <b><a href="qxttcpconnectionmanager.html#incomingConnection">incomingConnection</a></b> ( int <i>socketDescriptor</i> )</li>
</ul>
<ul>
<li><div class="fn"></div>1 protected function inherited from <a href="qxtabstractconnectionmanager.html#protected-functions">QxtAbstractConnectionManager</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 property inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qxtabstractconnectionmanager.html#public-slots">QxtAbstractConnectionManager</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>1 signal inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#signals">QObject</a></li>
<li><div class="fn"></div>1 public type inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-variables">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>2 protected variables inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QxtTcpConnectionManager class accepts TCP connections and maintains a connection pool</p>
<p>QxtTcpConnectionManager is a standardized interface for accepting and tracking incoming TCP connections.</p>
<p>Each incoming connection is assigned an arbitrary, opaque client ID number. This number can be used to retrieve the <a href="http://doc.qtsoftware.com/4.5/qtcpsocket.html">QTcpSocket</a> associated with it. A list of IDs for all current connections can be retrieved with the <a href="qxtabstractconnectionmanager.html#clients">clients</a>() function.</p>
<p>Like <a href="http://doc.qtsoftware.com/4.5/qtcpserver.html">QTcpServer</a>, QxtTcpConnectionManager can listen for incoming connections on a specified interface and port, and like <a href="http://doc.qtsoftware.com/4.5/qtcpserver.html">QTcpServer</a> you may override the <a href="qxttcpconnectionmanager.html#incomingConnection">incomingConnection</a>() function to change the handling of new connections. This is, for instance, where you would create a <a href="http://doc.qtsoftware.com/4.5/qsslsocket.html">QSslSocket</a> to encrypt communications.</p>
<p>See also <a href="http://doc.qtsoftware.com/4.5/qtcpserver.html">QTcpServer</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QxtTcpConnectionManager"></a>QxtTcpConnectionManager::QxtTcpConnectionManager ( <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a> * <i>parent</i> )</h3>
<p>Constructs a new <a href="qxttcpconnectionmanager.html">QxtTcpConnectionManager</a> object with the specified <i>parent</i>.</p>
<h3 class="fn"><a name="incomingConnection"></a><a href="http://doc.qtsoftware.com/4.5/qiodevice.html">QIODevice</a> * QxtTcpConnectionManager::incomingConnection ( int <i>socketDescriptor</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This function is called when a new TCP connection becomes available. The parameter is the native <i>socketDescriptor</i> for the connection, suitable for use in QTcpSocket::setSocketDescriptor.</p>
<p>The default implementation returns a new <a href="http://doc.qtsoftware.com/4.5/qtcpsocket.html">QTcpSocket</a> with the specified descriptor. Subclasses may return <a href="http://doc.qtsoftware.com/4.5/qtcpsocket.html">QTcpSocket</a> subclasses, such as <a href="http://doc.qtsoftware.com/4.5/qsslsocket.html">QSslSocket</a>.</p>
<h3 class="fn"><a name="listen"></a>bool QxtTcpConnectionManager::listen ( <a href="http://doc.qtsoftware.com/4.5/qhostaddress.html">QHostAddress</a> <i>iface</i> = QHostAddress::Any, int <i>port</i> = 80 )</h3>
<p>Listens on the specified interface <i>iface</i> on the specified <i>port</i> for connections. If <i>iface</i> is <a href="http://doc.qtsoftware.com/4.5/qhostaddress.html#SpecialAddress-enum">QHostAddress::Any</a>, listens on all interfaces.</p>
<p>Returns <tt>true</tt> on success; otherwise returns <tt>false</tt>.</p>
<h3 class="fn"><a name="proxy"></a><a href="http://doc.qtsoftware.com/4.5/qnetworkproxy.html">QNetworkProxy</a> QxtTcpConnectionManager::proxy () const</h3>
<p>Returns the proxy in use for the connection manager.</p>
<p>See also <a href="qxttcpconnectionmanager.html#setProxy">setProxy</a>() and <a href="http://doc.qtsoftware.com/4.5/qtcpserver.html#proxy">QTcpServer::proxy</a>().</p>
<h3 class="fn"><a name="setProxy"></a>void QxtTcpConnectionManager::setProxy ( const <a href="http://doc.qtsoftware.com/4.5/qnetworkproxy.html">QNetworkProxy</a> &amp; <i>proxy</i> )</h3>
<p>Sets an explicit network <i>proxy</i> for the connection manager.</p>
<p>See also <a href="qxttcpconnectionmanager.html#proxy">proxy</a>() and <a href="http://doc.qtsoftware.com/4.5/qtcpserver.html#setProxy">QTcpServer::setProxy</a>().</p>
<h3 class="fn"><a name="stopListening"></a>void QxtTcpConnectionManager::stopListening ()</h3>
<p>Stops listening for connections. Any connections still open will remain connected.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2007-2010
<a href="mailto:foundation@libqxt.org">Qxt Foundation</a></td>
<td align="right"><div align="right">
<a href="http://libqxt.org">Qxt</a> 0.6.1</div></td>
</tr></table></div></address></body>
</html>