com.trolltech.qt.network
Class QTcpSocket

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QObject
              extended by com.trolltech.qt.core.QIODevice
                  extended by com.trolltech.qt.network.QAbstractSocket
                      extended by 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, Server Example, Client Example, Fortune Server Example, Fortune Client Example, Example, Example

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.network.QAbstractSocket
QAbstractSocket.NetworkLayerProtocol, QAbstractSocket.SocketError, QAbstractSocket.SocketState, QAbstractSocket.SocketType
 
Nested classes/interfaces inherited from class com.trolltech.qt.core.QIODevice
QIODevice.OpenMode, QIODevice.OpenModeFlag
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Field Summary
 
Fields inherited from class com.trolltech.qt.network.QAbstractSocket
connected, disconnected, error, hostFound, proxyAuthenticationRequired, stateChanged
 
Fields inherited from class com.trolltech.qt.core.QIODevice
aboutToClose, bytesWritten, readyRead
 
Constructor Summary
QTcpSocket()
          Equivalent to QTcpSocket(0).
QTcpSocket(QObject parent)
          Creates a QTcpSocket object in state UnconnectedState.
 
Method Summary
static QTcpSocket fromNativePointer(QNativePointer nativePointer)
          This function returns the QTcpSocket instance pointed to by nativePointer
 
Methods inherited from class com.trolltech.qt.network.QAbstractSocket
abort, atEnd, bytesAvailable, bytesToWrite, canReadLine, close, connectToHost, connectToHost, connectToHostImplementation, disconnectFromHost, disconnectFromHostImplementation, error, flush, isSequential, isValid, localAddress, localPort, peerAddress, peerName, peerPort, proxy, readBufferSize, readData, readLineData, setLocalAddress, setLocalPort, setPeerAddress, setPeerName, setPeerPort, setProxy, setReadBufferSize, setSocketDescriptor, setSocketDescriptor, setSocketDescriptor, setSocketDescriptor, setSocketError, setSocketState, socketDescriptor, socketType, state, waitForBytesWritten, waitForConnected, waitForConnected, waitForDisconnected, waitForDisconnected, waitForReadyRead, writeData
 
Methods inherited from class com.trolltech.qt.core.QIODevice
errorString, getByte, isOpen, isReadable, isTextModeEnabled, isWritable, open, open, openMode, peek, peek, pos, putByte, read, read, readAll, readLine, readLine, readLine, reset, seek, setErrorString, setOpenMode, setOpenMode, setTextModeEnabled, size, ungetByte, write, write
 
Methods inherited from class com.trolltech.qt.core.QObject
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
disconnect, disconnect, signalSender
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QTcpSocket

public QTcpSocket()

Equivalent to QTcpSocket(0).


QTcpSocket

public QTcpSocket(QObject parent)

Creates a QTcpSocket object in state UnconnectedState.

parent is passed on to the QObject constructor.

See Also:
socketType
Method Detail

fromNativePointer

public static QTcpSocket fromNativePointer(QNativePointer nativePointer)
This function returns the QTcpSocket instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.