<class name="QTcpSocket" doc="/** <p>The <a href="QTcpSocket.html#QTcpSocket(com.trolltech.qt.core.QObject)"><tt>QTcpSocket</tt></a> class provides a TCP socket.</p> <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> <p><a href="QTcpSocket.html#QTcpSocket(com.trolltech.qt.core.QObject)"><tt>QTcpSocket</tt></a> is a convenience subclass of <a href="QAbstractSocket.html#QAbstractSocket(com.trolltech.qt.network.QAbstractSocket.SocketType, com.trolltech.qt.core.QObject)"><tt>QAbstractSocket</tt></a> that allows you to establish a TCP connection and transfer streams of data. See the <a href="QAbstractSocket.html#QAbstractSocket(com.trolltech.qt.network.QAbstractSocket.SocketType, com.trolltech.qt.core.QObject)"><tt>QAbstractSocket</tt></a> documentation for details.</p> <p><b>Note:</b> TCP sockets cannot be opened in QIODevice::Unbuffered mode.</p> @see <a href="QTcpServer.html"><tt>QTcpServer</tt></a> @see <a href="QUdpSocket.html"><tt>QUdpSocket</tt></a> @see <a href="QFtp.html"><tt>QFtp</tt></a> @see <a href="QHttp.html"><tt>QHttp</tt></a> @see Fortune Server Example</tt> @see Fortune Client Example</tt> @see Threaded Fortune Server Example</tt> @see Blocking Fortune Client Example</tt> @see Loopback Example</tt> @see Torrent Example</tt> */"> <signal name="protected final void aboutToClose()" doc="/** <p>This signal is emitted when the device is about to close. Connect this signal if you have operations that need to be performed before the device closes (e.g&#x2e;, if you have data in a separate buffer that needs to be written to the device).</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <signal name="protected final void bytesWritten(long bytes)" doc="/** <p>This signal is emitted every time a payload of data has been written to the device. The <tt>bytes</tt> argument is set to the number of bytes that were written in this payload.</p> <p><a href="QTcpSocket.html#bytesWritten(long)"><tt>bytesWritten</tt></a> is not emitted recursively; if you reenter the event loop or call <a href="QAbstractSocket.html#waitForBytesWritten(int)"><tt>waitForBytesWritten</tt></a> inside a slot connected to the <a href="QTcpSocket.html#bytesWritten(long)"><tt>bytesWritten</tt></a> signal, the signal will not be reemitted (although <a href="QAbstractSocket.html#waitForBytesWritten(int)"><tt>waitForBytesWritten</tt></a> may still return true).</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(long bytes)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QTcpSocket.html#readyRead()"><tt>readyRead</tt></a></dd> </dl> */"/> <signal name="protected final void connected()" doc="/** <p>This signal is emitted after connectToHost() has been called and a connection has been successfully established.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><tt>connectToHost</tt>, <a href="QTcpSocket.html#disconnected()"><tt>disconnected</tt></a></dd> </dl> */"/> <signal name="protected final void disconnected()" doc="/** <p>This signal is emitted when the socket has been disconnected.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><tt>connectToHost</tt>, <a href="QAbstractSocket.html#disconnectFromHost()"><tt>disconnectFromHost</tt></a>, <a href="QAbstractSocket.html#abort()"><tt>abort</tt></a></dd> </dl> */"/> <signal name="protected final void error(com.trolltech.qt.network.QAbstractSocket.SocketError arg__1)" doc="/** <p>This signal is emitted after an error occurred. The <tt>arg__1</tt> parameter describes the type of error that occurred.</p> <p>QAbstractSocket::SocketError is not a registered metatype, so for queued connections, you will have to register it with Q_REGISTER_METATYPE.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.network.QAbstractSocket.SocketError arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QTcpSocket.html#error(com.trolltech.qt.network.QAbstractSocket.SocketError)"><tt>error</tt></a>, <a href="%2E%2E/core/%2E%2E/core/QIODevice.html#errorString()"><tt>errorString</tt></a></dd> </dl> */"/> <signal name="protected final void hostFound()" doc="/** <p>This signal is emitted after connectToHost() has been called and the host lookup has succeeded.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QTcpSocket.html#connected()"><tt>connected</tt></a></dd> </dl> */"/> <signal name="protected final void proxyAuthenticationRequiredPrivate(com.trolltech.qt.network.QNetworkProxy proxy, com.trolltech.qt.network.QAuthenticator authenticator)" doc="/** <p>This signal can be emitted when a <tt>proxy</tt> that requires authentication is used. The <tt>authenticator</tt> object can then be filled in with the required details to allow authentication and continue the connection.</p> <p><b>Note:</b> It is not possible to use a QueuedConnection to connect to this signal, as the connection will fail if the authenticator has not been filled in with new information when the signal returns.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.network.QNetworkProxy proxy, com.trolltech.qt.network.QAuthenticator authenticator)</tt></dd> <dd><tt>void mySlot(com.trolltech.qt.network.QNetworkProxy proxy)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QAuthenticator.html"><tt>QAuthenticator</tt></a>, <a href="QNetworkProxy.html"><tt>QNetworkProxy</tt></a></dd> </dl> */"/> <signal name="protected final void readyRead()" doc="/** <p>This signal is emitted once every time new data is available for reading from the device. It will only be emitted again once new data is available, such as when a new payload of network data has arrived on your network socket, or when a new block of data has been appended to your device.</p> <p><a href="QTcpSocket.html#readyRead()"><tt>readyRead</tt></a> is not emitted recursively; if you reenter the event loop or call <a href="QAbstractSocket.html#waitForReadyRead(int)"><tt>waitForReadyRead</tt></a> inside a slot connected to the <a href="QTcpSocket.html#readyRead()"><tt>readyRead</tt></a> signal, the signal will not be reemitted (although <a href="QAbstractSocket.html#waitForReadyRead(int)"><tt>waitForReadyRead</tt></a> may still return true).</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QTcpSocket.html#bytesWritten(long)"><tt>bytesWritten</tt></a></dd> </dl> */"/> <signal name="protected final void stateChanged(com.trolltech.qt.network.QAbstractSocket.SocketState arg__1)" doc="/** <p>This signal is emitted whenever <a href="QAbstractSocket.html#QAbstractSocket(com.trolltech.qt.network.QAbstractSocket.SocketType, com.trolltech.qt.core.QObject)"><tt>QAbstractSocket</tt></a>'s state changes. The <tt>arg__1</tt> parameter is the new state.</p> <p>QAbstractSocket::SocketState is not a registered metatype, so for queued connections, you will have to register it with Q_REGISTER_METATYPE.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.network.QAbstractSocket.SocketState arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QAbstractSocket.html#state()"><tt>state</tt></a></dd> </dl> */"/> <method name="public QTcpSocket(com.trolltech.qt.core.QObject parent)" doc="/** <p>Creates a <a href="QTcpSocket.html#QTcpSocket(com.trolltech.qt.core.QObject)"><tt>QTcpSocket</tt></a> object in state <tt>UnconnectedState</tt>.</p> <p><tt>parent</tt> is passed on to the <a href="%2E%2E/core/%2E%2E/core/QObject.html#QObject(com.trolltech.qt.core.QObject)"><tt>QObject</tt></a> constructor.</p> @see <a href="QAbstractSocket.html#socketType()"><tt>socketType</tt></a> */"/> <method name="public QTcpSocket()" doc="/** <p>Equivalent to <a href="QTcpSocket.html#QTcpSocket(com.trolltech.qt.core.QObject)"><tt>QTcpSocket</tt></a>(0). */"/> </class>