com.trolltech.qt.network
Class QTcpSocket
java.lang.Object
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.core.QIODevice
com.trolltech.qt.network.QAbstractSocket
com.trolltech.qt.network.QTcpSocket
- All Implemented Interfaces:
- QtJambiInterface
public class QTcpSocket
- extends QAbstractSocket
The QTcpSocket
class provides a TCP socket. TCP (Transmission Control Protocol) is a reliable, stream-oriented, connection-oriented transport protocol. It is especially well suited for continuous transmission of data.
QTcpSocket
is a convenience subclass of QAbstractSocket
that allows you to establish a TCP connection and transfer streams of data. See the QAbstractSocket
documentation for details.
Note: TCP sockets cannot be opened in QIODevice::Unbuffered
mode.
See also:
QTcpServer
, QUdpSocket
, QFtp
, QHttp
, Fortune Server Example, Fortune Client Example, Threaded Fortune Server Example, Blocking Fortune Client Example, Loopback Example, and Torrent Example.
Methods inherited from class com.trolltech.qt.network.QAbstractSocket |
abort, connectToHost, connectToHost, connectToHost, connectToHost, connectToHost, connectToHost, disconnectFromHost, disconnectFromHostImplementation, error, flush, isValid, localAddress, localPort, peerAddress, peerName, peerPort, proxy, readBufferSize, setLocalAddress, setLocalPort, setPeerAddress, setPeerName, setPeerPort, setProxy, setReadBufferSize, setSocketDescriptor, setSocketDescriptor, setSocketDescriptor, setSocketDescriptor, setSocketError, setSocketState, socketDescriptor, socketType, state, waitForConnected, waitForConnected, waitForDisconnected, waitForDisconnected |
Methods inherited from class com.trolltech.qt.core.QIODevice |
atEnd, bytesAvailable, bytesToWrite, canReadLine, close, errorString, getByte, isOpen, isReadable, isSequential, isTextModeEnabled, isWritable, open, open, openMode, peek, peek, pos, putByte, read, read, readAll, readData, readLine, readLine, readLine, readLineData, reset, seek, setErrorString, setOpenMode, setOpenMode, setTextModeEnabled, size, ungetByte, waitForBytesWritten, waitForReadyRead, write, write, writeData |
Methods inherited from class com.trolltech.qt.core.QObject |
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class java.lang.Object |
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QTcpSocket
public QTcpSocket()
- Creates a
QTcpSocket
object in state UnconnectedState. parent is passed on to the QObject
constructor.
- See also:
socketType()
.
QTcpSocket
public QTcpSocket(QObject parent)
- Creates a
QTcpSocket
object in state UnconnectedState. parent is passed on to the QObject
constructor.
- See also:
socketType()
.
fromNativePointer
public static QTcpSocket fromNativePointer(QNativePointer nativePointer)
- This method returns the QTcpSocket instance pointed to by nativePointer.