1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/network/qtcpsocket.cpp -->
7
<title>Qt 4.0: QTcpSocket Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QTcpSocket Class Reference</h1>
21
<p>The QTcpSocket class provides a TCP socket. <a href="#details">More...</a></p>
22
<pre>#include <QTcpSocket></pre><p>Part of the <a href="qtnetwork.html">QtNetwork</a> module.</p>
23
<p>Inherits <a href="qabstractsocket.html">QAbstractSocket</a>.</p>
24
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
26
<li><a href="qtcpsocket-members.html">List of all members, including inherited members</a></li>
28
<a name="public-functions"></a>
29
<h3>Public Functions</h3>
31
<li><div class="fn"/><b><a href="qtcpsocket.html#QTcpSocket">QTcpSocket</a></b> ( QObject * <i>parent</i> = 0 )</li>
32
<li><div class="fn"/>virtual <b><a href="qtcpsocket.html#dtor.QTcpSocket">~QTcpSocket</a></b> ()</li>
35
<li><div class="fn"/>24 public functions inherited from <a href="qabstractsocket.html#public-functions">QAbstractSocket</a></li>
36
<li><div class="fn"/>30 public functions inherited from <a href="qiodevice.html#public-functions">QIODevice</a></li>
37
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
39
<h3>Additional Inherited Members</h3>
41
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
42
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
43
<li><div class="fn"/>5 signals inherited from <a href="qabstractsocket.html#signals">QAbstractSocket</a></li>
44
<li><div class="fn"/>3 signals inherited from <a href="qiodevice.html#signals">QIODevice</a></li>
45
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
46
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
47
<li><div class="fn"/>2 protected functions inherited from <a href="qabstractsocket.html#protected-functions">QAbstractSocket</a></li>
48
<li><div class="fn"/>5 protected functions inherited from <a href="qiodevice.html#protected-functions">QIODevice</a></li>
49
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
51
<a name="details"></a>
53
<h2>Detailed Description</h2>
54
<p>The QTcpSocket class provides a TCP socket.</p>
55
<p>TCP (Transmission Control Protocol) is a reliable, stream-oriented, connection-oriented transport protocol. It is especially well suited for continuous transmission of data.</p>
56
<p>QTcpSocket is a convenience subclass of <a href="qabstractsocket.html">QAbstractSocket</a> that allows you to establish a TCP connection and transfer streams of data. See the <a href="qabstractsocket.html">QAbstractSocket</a> documentation for details.</p>
57
<p>The <a href="network-fortuneserver.html">Fortune Server</a>, <a href="network-fortuneclient.html">Fortune Client</a>, <a href="network-threadedfortuneserver.html">Threaded Fortune Server</a>, and <a href="network-blockingfortuneclient.html">Blocking Fortune Client</a> examples illustrate how to use QTcpSocket in applications.</p>
58
<p>See also <a href="qtcpserver.html">QTcpServer</a>, <a href="qudpsocket.html">QUdpSocket</a>, <a href="qftp.html">QFtp</a>, and <a href="qhttp.html">QHttp</a>.</p>
60
<h2>Member Function Documentation</h2>
61
<h3 class="fn"><a name="QTcpSocket"></a>QTcpSocket::QTcpSocket ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
62
<p>Creates a <a href="qtcpsocket.html">QTcpSocket</a> object in state <tt>UnconnectedState</tt>.</p>
63
<p><i>parent</i> is passed on to the <a href="qobject.html">QObject</a> constructor.</p>
64
<p>See also <a href="qabstractsocket.html#socketType">socketType</a>().</p>
65
<h3 class="fn"><a name="dtor.QTcpSocket"></a>QTcpSocket::~QTcpSocket () <tt> [virtual]</tt></h3>
66
<p>Destroys the socket, closing the connection if necessary.</p>
67
<p>See also <a href="qabstractsocket.html#close">close</a>().</p>
68
<p /><address><hr /><div align="center">
69
<table width="100%" cellspacing="0" border="0"><tr class="address">
70
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
71
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
72
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
73
</tr></table></div></address></body>