QTcpSocket

#include <QtNetwork/QTcpSocket>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QTcpSocket


Overview

Inheritance

Public Functions Index

QTcpSocket (QObject *parent=0)
virtual ~QTcpSocket ()
voidabort ()Inherited
virtual boolatEnd () const Inherited
virtual qint64bytesAvailable () const Inherited
virtual qint64bytesToWrite () const Inherited
virtual boolcanReadLine () const Inherited
virtual voidclose ()Inherited
voidconnectToHost (const QString &hostName, quint16 port, OpenMode mode=ReadWrite)Inherited
voidconnectToHost (const QHostAddress &address, quint16 port, OpenMode mode=ReadWrite)Inherited
voiddisconnectFromHost ()Inherited
SocketErrorerror () const Inherited
QStringerrorString () const Inherited
boolflush ()Inherited
boolgetChar (char *c)Inherited
boolisOpen () const Inherited
boolisReadable () const Inherited
virtual boolisSequential () const Inherited
boolisTextModeEnabled () const Inherited
boolisValid () const Inherited
boolisWritable () const Inherited
QHostAddresslocalAddress () const Inherited
quint16localPort () const Inherited
virtual boolopen (OpenMode mode)Inherited
OpenModeopenMode () const Inherited
qint64peek (char *data, qint64 maxlen)Inherited
QByteArraypeek (qint64 maxlen)Inherited
QHostAddresspeerAddress () const Inherited
QStringpeerName () const Inherited
quint16peerPort () const Inherited
virtual qint64pos () const Inherited
QNetworkProxyproxy () const Inherited
boolputChar (char c)Inherited
QAbstractSocket (SocketType socketType, QObject *parent)Inherited
QIODevice ()Inherited
QIODevice (QObject *parent)Inherited
qint64read (char *data, qint64 maxlen)Inherited
QByteArrayread (qint64 maxlen)Inherited
QByteArrayreadAll ()Inherited
qint64readBufferSize () const Inherited
qint64readLine (char *data, qint64 maxlen)Inherited
QByteArrayreadLine (qint64 maxlen=0)Inherited
virtual boolreset ()Inherited
virtual boolseek (qint64 pos)Inherited
voidsetProxy (const QNetworkProxy &networkProxy)Inherited
voidsetReadBufferSize (qint64 size)Inherited
boolsetSocketDescriptor (int socketDescriptor, SocketState state=ConnectedState, OpenMode openMode=ReadWrite)Inherited
voidsetSocketOption (QAbstractSocket::SocketOption option, const QVariant &value)Inherited
voidsetTextModeEnabled (bool enabled)Inherited
virtual qint64size () const Inherited
intsocketDescriptor () const Inherited
QVariantsocketOption (QAbstractSocket::SocketOption option)Inherited
SocketTypesocketType () const Inherited
SocketStatestate () const Inherited
voidungetChar (char c)Inherited
virtual boolwaitForBytesWritten (int msecs=30000)Inherited
boolwaitForConnected (int msecs=30000)Inherited
boolwaitForDisconnected (int msecs=30000)Inherited
virtual boolwaitForReadyRead (int msecs=30000)Inherited
qint64write (const char *data, qint64 len)Inherited
qint64write (const char *data)Inherited
qint64write (const QByteArray &data)Inherited

Protected Functions Index

QTcpSocket (QTcpSocketPrivate &dd, QObject *parent=0)
QAbstractSocket (SocketType socketType, QAbstractSocketPrivate &dd, QObject *parent=0)Inherited
QIODevice (QIODevicePrivate &dd, QObject *parent=0)Inherited
virtual qint64readData (char *data, qint64 maxlen)Inherited
virtual qint64readLineData (char *data, qint64 maxlen)Inherited
voidsetErrorString (const QString &errorString)Inherited
voidsetLocalAddress (const QHostAddress &address)Inherited
voidsetLocalPort (quint16 port)Inherited
voidsetOpenMode (OpenMode openMode)Inherited
voidsetPeerAddress (const QHostAddress &address)Inherited
voidsetPeerName (const QString &name)Inherited
voidsetPeerPort (quint16 port)Inherited
voidsetSocketError (SocketError socketError)Inherited
voidsetSocketState (SocketState state)Inherited
virtual qint64writeData (const char *data, qint64 len)Inherited

Signals Index

Only has inherited signals

voidaboutToClose ()Inherited
voidbytesWritten (qint64 bytes)Inherited
voidconnected ()Inherited
voiddisconnected ()Inherited
voiderror (QAbstractSocket::SocketError)Inherited
voidhostFound ()Inherited
voidproxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator)Inherited
voidreadChannelFinished ()Inherited
voidreadyRead ()Inherited
voidstateChanged (QAbstractSocket::SocketState)Inherited

Public Types

(Only has inherited public types)

NetworkLayerProtocol Inherited

IPv4Protocol
IPv6Protocol
UnknownNetworkLayerProtocol -1

OpenModeFlag Inherited

NotOpen 0x0000
ReadOnly 0x0001
WriteOnly 0x0002
ReadWrite ReadOnly | WriteOnly
Append 0x0004
Truncate 0x0008
Text 0x0010
Unbuffered 0x0020

SocketError Inherited

ConnectionRefusedError
RemoteHostClosedError
HostNotFoundError
SocketAccessError
SocketResourceError
SocketTimeoutError
DatagramTooLargeError
NetworkError
AddressInUseError
SocketAddressNotAvailableError
UnsupportedSocketOperationError
UnfinishedSocketOperationError
ProxyAuthenticationRequiredError
SslHandshakeFailedError
ProxyConnectionRefusedError
ProxyConnectionClosedError
ProxyConnectionTimeoutError
ProxyNotFoundError
ProxyProtocolError
UnknownSocketError -1

SocketOption Inherited

LowDelayOption
KeepAliveOption
MulticastTtlOption
MulticastLoopbackOption

SocketState Inherited

UnconnectedState
HostLookupState
ConnectingState
ConnectedState
BoundState
ListeningState
ClosingState

SocketType Inherited

TcpSocket
UdpSocket
UnknownSocketType -1

Public Functions

QTcpSocket (

virtual~QTcpSocket ()

Destructor.

void abort ()Inherited

virtual bool atEnd ()Inherited

virtual qint64 bytesAvailable ()Inherited

virtual qint64 bytesToWrite ()Inherited

virtual bool canReadLine ()Inherited

virtual void close ()Inherited

void connectToHost (
  • const QString &hostName,
  • quint16port,
  • OpenModemode )
Inherited

void connectToHost (Inherited

void disconnectFromHost ()Inherited

SocketError error ()Inherited

QString errorString ()Inherited

bool flush ()Inherited

bool getChar (
  • char *c)
Inherited

bool isOpen ()Inherited

bool isReadable ()Inherited

virtual bool isSequential ()Inherited

bool isTextModeEnabled ()Inherited

bool isValid ()Inherited

bool isWritable ()Inherited

QHostAddress localAddress ()Inherited

quint16 localPort ()Inherited

virtual bool open (
  • OpenModemode)
Inherited

OpenMode openMode ()Inherited

qint64 peek (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray peek (
  • qint64maxlen)
Inherited

QHostAddress peerAddress ()Inherited

QString peerName ()Inherited

quint16 peerPort ()Inherited

virtual qint64 pos ()Inherited

QNetworkProxy proxy ()Inherited

bool putChar (
  • charc)
Inherited

QAbstractSocket (
  • SocketTypesocketType,
  • QObject *parent )
Inherited

QIODevice ()Inherited

QIODevice (Inherited

qint64 read (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray read (
  • qint64maxlen)
Inherited

QByteArray readAll ()Inherited

qint64 readBufferSize ()Inherited

qint64 readLine (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray readLine (
  • qint64maxlen)
Inherited

virtual bool reset ()Inherited

virtual bool seek (
  • qint64pos)
Inherited

void setProxy (Inherited

void setReadBufferSize (
  • qint64size)
Inherited

bool setSocketDescriptor (
  • intsocketDescriptor,
  • SocketStatestate,
  • OpenModeopenMode )
Inherited

void setSocketOption (
  • QAbstractSocket::SocketOptionoption,
  • const QVariant &value )
Inherited

void setTextModeEnabled (
  • boolenabled)
Inherited

virtual qint64 size ()Inherited

int socketDescriptor ()Inherited

QVariant socketOption (
  • QAbstractSocket::SocketOptionoption)
Inherited

SocketType socketType ()Inherited

SocketState state ()Inherited

void ungetChar (
  • charc)
Inherited

virtual bool waitForBytesWritten (
  • intmsecs)
Inherited

bool waitForConnected (
  • intmsecs)
Inherited

bool waitForDisconnected (
  • intmsecs)
Inherited

virtual bool waitForReadyRead (
  • intmsecs)
Inherited

qint64 write (
  • const char *data,
  • qint64len )
Inherited

qint64 write (
  • const char *data)
Inherited

qint64 write (Inherited

Protected Functions

QTcpSocket (
  • QTcpSocketPrivate &dd,
  • QObject *parent )

QAbstractSocket (
  • SocketTypesocketType,
  • QAbstractSocketPrivate &dd,
  • QObject *parent )
Inherited

QIODevice (
  • QIODevicePrivate &dd,
  • QObject *parent )
Inherited

virtual qint64 readData (
  • char *data,
  • qint64maxlen )
Inherited

virtual qint64 readLineData (
  • char *data,
  • qint64maxlen )
Inherited

void setErrorString (Inherited

void setLocalAddress (Inherited

void setLocalPort (
  • quint16port)
Inherited

void setOpenMode (
  • OpenModeopenMode)
Inherited

void setPeerAddress (Inherited

void setPeerName (Inherited

void setPeerPort (
  • quint16port)
Inherited

void setSocketError (
  • SocketErrorsocketError)
Inherited

void setSocketState (
  • SocketStatestate)
Inherited

virtual qint64 writeData (
  • const char *data,
  • qint64len )
Inherited

Signals

(Only has inherited signals)

void aboutToClose ()Inherited

void bytesWritten (
  • qint64bytes)
Inherited

void connected ()Inherited

void disconnected ()Inherited

void error (
  • QAbstractSocket::SocketError)
Inherited

void hostFound ()Inherited

void proxyAuthenticationRequired (Inherited

void readChannelFinished ()Inherited

void readyRead ()Inherited

void stateChanged (
  • QAbstractSocket::SocketState)
Inherited

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus