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
QIODevice | |||
QAbstractSocket | |||
QTcpSocket | |||
QSslSocket |
Public Types Index
Only has inherited public types
enum NetworkLayerProtocol | |
enum OpenModeFlagNotOpen 0x0000, ReadOnly 0x0001, WriteOnly 0x0002, ReadWrite ReadOnly | WriteOnly, Append 0x0004, Truncate 0x0008, Text 0x0010, Unbuffered 0x0020 | |
enum SocketErrorConnectionRefusedError, RemoteHostClosedError, HostNotFoundError, SocketAccessError, SocketResourceError, SocketTimeoutError, DatagramTooLargeError, NetworkError, AddressInUseError, SocketAddressNotAvailableError, UnsupportedSocketOperationError, UnfinishedSocketOperationError, ProxyAuthenticationRequiredError, SslHandshakeFailedError, ProxyConnectionRefusedError, ProxyConnectionClosedError, ProxyConnectionTimeoutError, ProxyNotFoundError, ProxyProtocolError, UnknownSocketError -1 | |
enum SocketOptionLowDelayOption, KeepAliveOption, MulticastTtlOption, MulticastLoopbackOption | |
enum SocketStateUnconnectedState, HostLookupState, ConnectingState, ConnectedState, BoundState, ListeningState, ClosingState | |
enum SocketType |
Public Functions Index
QTcpSocket (QObject *parent=0) | |
virtual | ~QTcpSocket () |
void | abort ()![]() |
virtual bool | atEnd () const ![]() |
virtual qint64 | bytesAvailable () const ![]() |
virtual qint64 | bytesToWrite () const ![]() |
virtual bool | canReadLine () const ![]() |
virtual void | close ()![]() |
void | connectToHost (const QString &hostName, quint16 port, OpenMode mode=ReadWrite)![]() |
void | connectToHost (const QHostAddress &address, quint16 port, OpenMode mode=ReadWrite)![]() |
void | disconnectFromHost ()![]() |
SocketError | error () const ![]() |
QString | errorString () const ![]() |
bool | flush ()![]() |
bool | getChar (char *c)![]() |
bool | isOpen () const ![]() |
bool | isReadable () const ![]() |
virtual bool | isSequential () const ![]() |
bool | isTextModeEnabled () const ![]() |
bool | isValid () const ![]() |
bool | isWritable () const ![]() |
QHostAddress | localAddress () const ![]() |
quint16 | localPort () const ![]() |
virtual bool | open (OpenMode mode)![]() |
OpenMode | openMode () const ![]() |
qint64 | peek (char *data, qint64 maxlen)![]() |
QByteArray | peek (qint64 maxlen)![]() |
QHostAddress | peerAddress () const ![]() |
QString | peerName () const ![]() |
quint16 | peerPort () const ![]() |
virtual qint64 | pos () const ![]() |
QNetworkProxy | proxy () const ![]() |
bool | putChar (char c)![]() |
QAbstractSocket (SocketType socketType, QObject *parent)![]() | |
QIODevice ()![]() | |
QIODevice (QObject *parent)![]() | |
qint64 | read (char *data, qint64 maxlen)![]() |
QByteArray | read (qint64 maxlen)![]() |
QByteArray | readAll ()![]() |
qint64 | readBufferSize () const ![]() |
qint64 | readLine (char *data, qint64 maxlen)![]() |
QByteArray | readLine (qint64 maxlen=0)![]() |
virtual bool | reset ()![]() |
virtual bool | seek (qint64 pos)![]() |
void | setProxy (const QNetworkProxy &networkProxy)![]() |
void | setReadBufferSize (qint64 size)![]() |
bool | setSocketDescriptor (int socketDescriptor, SocketState state=ConnectedState, OpenMode openMode=ReadWrite)![]() |
void | setSocketOption (QAbstractSocket::SocketOption option, const QVariant &value)![]() |
void | setTextModeEnabled (bool enabled)![]() |
virtual qint64 | size () const ![]() |
int | socketDescriptor () const ![]() |
QVariant | socketOption (QAbstractSocket::SocketOption option)![]() |
SocketType | socketType () const ![]() |
SocketState | state () const ![]() |
void | ungetChar (char c)![]() |
virtual bool | waitForBytesWritten (int msecs=30000)![]() |
bool | waitForConnected (int msecs=30000)![]() |
bool | waitForDisconnected (int msecs=30000)![]() |
virtual bool | waitForReadyRead (int msecs=30000)![]() |
qint64 | write (const char *data, qint64 len)![]() |
qint64 | write (const char *data)![]() |
qint64 | write (const QByteArray &data)![]() |
Protected Functions Index
QTcpSocket (QTcpSocketPrivate &dd, QObject *parent=0) | |
QAbstractSocket (SocketType socketType, QAbstractSocketPrivate &dd, QObject *parent=0)![]() | |
QIODevice (QIODevicePrivate &dd, QObject *parent=0)![]() | |
virtual qint64 | readData (char *data, qint64 maxlen)![]() |
virtual qint64 | readLineData (char *data, qint64 maxlen)![]() |
void | setErrorString (const QString &errorString)![]() |
void | setLocalAddress (const QHostAddress &address)![]() |
void | setLocalPort (quint16 port)![]() |
void | setOpenMode (OpenMode openMode)![]() |
void | setPeerAddress (const QHostAddress &address)![]() |
void | setPeerName (const QString &name)![]() |
void | setPeerPort (quint16 port)![]() |
void | setSocketError (SocketError socketError)![]() |
void | setSocketState (SocketState state)![]() |
virtual qint64 | writeData (const char *data, qint64 len)![]() |
Signals Index
Only has inherited signals
void | aboutToClose ()![]() |
void | bytesWritten (qint64 bytes)![]() |
void | connected ()![]() |
void | disconnected ()![]() |
void | error (QAbstractSocket::SocketError)![]() |
void | hostFound ()![]() |
void | proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *authenticator)![]() |
void | readChannelFinished ()![]() |
void | readyRead ()![]() |
void | stateChanged (QAbstractSocket::SocketState)![]() |
Public Types
(Only has inherited public types)
- IPv4Protocol
- IPv6Protocol
- UnknownNetworkLayerProtocol -1
- NotOpen 0x0000
- ReadOnly 0x0001
- WriteOnly 0x0002
- ReadWrite ReadOnly | WriteOnly
- Append 0x0004
- Truncate 0x0008
- Text 0x0010
- Unbuffered 0x0020
- ConnectionRefusedError
- RemoteHostClosedError
- HostNotFoundError
- SocketAccessError
- SocketResourceError
- SocketTimeoutError
- DatagramTooLargeError
- NetworkError
- AddressInUseError
- SocketAddressNotAvailableError
- UnsupportedSocketOperationError
- UnfinishedSocketOperationError
- ProxyAuthenticationRequiredError
- SslHandshakeFailedError
- ProxyConnectionRefusedError
- ProxyConnectionClosedError
- ProxyConnectionTimeoutError
- ProxyNotFoundError
- ProxyProtocolError
- UnknownSocketError -1
- LowDelayOption
- KeepAliveOption
- MulticastTtlOption
- MulticastLoopbackOption
- UnconnectedState
- HostLookupState
- ConnectingState
- ConnectedState
- BoundState
- ListeningState
- ClosingState
- TcpSocket
- UdpSocket
- UnknownSocketType -1
Public Functions
virtual
Destructor.
void 
virtual bool 
virtual qint64 
virtual qint64 
virtual bool 
virtual void 
void 
void 
void 
SocketError 
bool 
bool 
bool 
bool 
virtual bool 
bool 
bool 
bool 
quint16 
virtual bool 
OpenMode 
qint64 
quint16 
virtual qint64 
bool 
qint64 
qint64 
qint64 
virtual bool 
virtual bool 
void 
void 
bool 
void 
void 
virtual qint64 
int 
SocketType 
SocketState 
void 
virtual bool 
bool 
bool 
virtual bool 
qint64 
qint64 
qint64 
Protected Functions
virtual qint64 
virtual qint64 
void 
void 
void 
void 
void 
void 
void 
void 
void 
virtual qint64 
Signals
(Only has inherited signals)
void 
void 
void 
void 
void 
void 
void 
void 
void 
void 
© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Documentation sources may be obtained from www.qt-project.org.
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy