Sophie

Sophie

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

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/qxtrpcpeer.cpp -->
<head>
  <title>QxtRPCPeer 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">QxtRPCPeer Class Reference<br /><span class="small-subtitle">[<a href="qxtnetwork.html">QxtNetwork</a> module]</span>
</h1>
<p>The QxtRPCPeer class transmits Qt signals over a network connection <a href="#details">More...</a></p>
<pre>    #include &lt;QxtRPCPeer&gt;</pre><p>Inherits <a href="qxtrpcservice.html">QxtRPCService</a>.</p>
<ul>
<li><a href="qxtrpcpeer-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="qxtrpcpeer.html#QxtRPCPeer">QxtRPCPeer</a></b> ( QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"></div>void <b><a href="qxtrpcpeer.html#connect">connect</a></b> ( QHostAddress <i>addr</i>, int <i>port</i> = 80 )</li>
<li><div class="fn"></div>void <b><a href="qxtrpcpeer.html#connect-2">connect</a></b> ( QString <i>addr</i>, int <i>port</i> = 80 )</li>
<li><div class="fn"></div>bool <b><a href="qxtrpcpeer.html#listen">listen</a></b> ( QHostAddress <i>iface</i> = QHostAddress::Any, int <i>port</i> = 80 )</li>
<li><div class="fn"></div>void <b><a href="qxtrpcpeer.html#stopListening">stopListening</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"></div>15 public functions inherited from <a href="qxtrpcservice.html#public-functions">QxtRPCService</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>
<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>8 public slots inherited from <a href="qxtrpcservice.html#public-slots">QxtRPCService</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>7 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-functions">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 QxtRPCPeer class transmits Qt signals over a network connection</p>
<p>QxtRPCPeer is a tool that encapsulates Qt signals and transmits them over a network connection. The signal is subsequently re-emitted on the receiving end of the connection.</p>
<p>As a <a href="qxtrpcservice.html">QxtRPCService</a> subclass, QxtRPCPeer can act as a client or a server. When acting as a server, it uses a <a href="qxttcpconnectionmanager.html">QxtTcpConnectionManager</a> to accept connections. When acting as a client, applications may use <a href="qxtrpcpeer.html#connect">connect</a>() to establish a TCP connection with a server.</p>
<p>All data types used in attached signals and slots must be declared and registered with <a href="http://doc.qtsoftware.com/4.5/qmetatype.html">QMetaType</a> using Q_DECLARE_METATYPE and qRegisterMetaType. Additional requirements may be imposed by the QxtAbstractSignalSerializer subclass in use; the default QxtDataStreamSignalSerializer requires that they have stream operators registered with qRegisterMetaTypeStreamOperators.</p>
<p>Due to a restriction of Qt's signals and slots mechanism, the number of parameters that can be passed to <a href="qxtrpcservice.html#call">call</a>() and its related functions, as well as the number of parameters to any signal or slot attached to QxtRPCPeer, is limited to 8.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QxtRPCPeer"></a>QxtRPCPeer::QxtRPCPeer ( <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Creates a <a href="qxtrpcpeer.html">QxtRPCPeer</a> object with the given <i>parent</i>.</p>
<h3 class="fn"><a name="connect"></a>void QxtRPCPeer::connect ( <a href="http://doc.qtsoftware.com/4.5/qhostaddress.html">QHostAddress</a> <i>addr</i>, int <i>port</i> = 80 )</h3>
<p>Connects to the specified server <i>addr</i> on the selected <i>port</i>.</p>
<p>When the connection is complete, the connectedToServer() signal will be emitted. If an error occurs, the serverError() signal will be emitted.</p>
<h3 class="fn"><a name="connect-2"></a>void QxtRPCPeer::connect ( <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> <i>addr</i>, int <i>port</i> = 80 )</h3>
<p>Connects to the specified peer or server <i>addr</i> on the selected <i>port</i>.</p>
<p>When the connection is complete, the connectedToServer() signal will be emitted. If an error occurs, the serverError() signal will be emitted.</p>
<h3 class="fn"><a name="listen"></a>bool QxtRPCPeer::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.</p>
<p>Attempting to listen while in Client mode or while connected in Peer mode will be ignored with a warning. In Peer mode, only one connection can be active at a time. Additional incoming connections while connected to a peer will be dropped. When a peer connects, the peerConnected() signal will be emitted. In Server mode, multiple connections can be active at a time. Each client that connects will be provided a unique ID, included in the clientConnected() signal that will be emitted. Returns <tt>true</tt> if succeeds, <tt>false</tt> otherwise.</p>
<h3 class="fn"><a name="stopListening"></a>void QxtRPCPeer::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>