QAbstractSocket Class Reference
[QtNetwork module]
Inherits QIODevice.
Inherited by QTcpSocket and QUdpSocket.
Types
- enum NetworkLayerProtocol { IPv4Protocol, IPv6Protocol, UnknownNetworkLayerProtocol }
- enum SocketError { ConnectionRefusedError, RemoteHostClosedError, HostNotFoundError, SocketAccessError, ..., UnknownSocketError }
- enum SocketOption { LowDelayOption, KeepAliveOption }
- enum SocketState { UnconnectedState, HostLookupState, ConnectingState, ConnectedState, ..., ClosingState }
- enum SocketType { TcpSocket, UdpSocket, UnknownSocketType }
Methods
- __init__ (self, SocketType, QObject)
- abort (self)
- bool atEnd (self)
- int bytesAvailable (self)
- int bytesToWrite (self)
- bool canReadLine (self)
- close (self)
- connectToHost (self, QString, int, QIODevice.OpenMode mode = QIODevice.ReadWrite)
- connectToHost (self, QHostAddress, int, QIODevice.OpenMode mode = QIODevice.ReadWrite)
- connectToHostImplementation (self, QString, int, QIODevice.OpenMode mode = QIODevice.ReadWrite)
- disconnectFromHost (self)
- disconnectFromHostImplementation (self)
- SocketError error (self)
- bool flush (self)
- bool isSequential (self)
- bool isValid (self)
- QHostAddress localAddress (self)
- int localPort (self)
- QHostAddress peerAddress (self)
- QString peerName (self)
- int peerPort (self)
- QNetworkProxy proxy (self)
- int readBufferSize (self)
- str readData (self, int maxlen)
- str readLineData (self, int maxlen)
- setLocalAddress (self, QHostAddress)
- setLocalPort (self, int)
- setPeerAddress (self, QHostAddress)
- setPeerName (self, QString)
- setPeerPort (self, int)
- setProxy (self, QNetworkProxy)
- setReadBufferSize (self, int)
- bool setSocketDescriptor (self, int, SocketState state = QAbstractSocket.ConnectedState, QIODevice.OpenMode mode = QIODevice.ReadWrite)
- setSocketError (self, SocketError)
- setSocketOption (self, SocketOption, QVariant)
- setSocketState (self, SocketState)
- int socketDescriptor (self)
- QVariant socketOption (self, SocketOption)
- SocketType socketType (self)
- SocketState state (self)
- bool waitForBytesWritten (self, int msecs = 30000)
- bool waitForConnected (self, int msecs = 30000)
- bool waitForDisconnected (self, int msecs = 30000)
- bool waitForReadyRead (self, int msecs = 30000)
- int writeData (self, str)
Qt Signals
Detailed Description
Type Documentation
QAbstractSocket.NetworkLayerProtocol
QAbstractSocket.SocketError
QAbstractSocket.SocketOption
QAbstractSocket.SocketState
QAbstractSocket.SocketType
Method Documentation
QAbstractSocket.__init__ (self, SocketType, QObject)
The QObject argument, if not None, causes self to be owned by Qt instead of PyQt.
QAbstractSocket.abort (self)
bool QAbstractSocket.atEnd (self)
int QAbstractSocket.bytesAvailable (self)
int QAbstractSocket.bytesToWrite (self)
bool QAbstractSocket.canReadLine (self)
QAbstractSocket.close (self)
QAbstractSocket.connectToHost (self, QString, int, QIODevice.OpenMode mode = QIODevice.ReadWrite)
QAbstractSocket.connectToHost (self, QHostAddress, int, QIODevice.OpenMode mode = QIODevice.ReadWrite)
QAbstractSocket.connectToHostImplementation (self, QString, int, QIODevice.OpenMode mode = QIODevice.ReadWrite)
This method is also a Qt slot with the C++ signature void connectToHostImplementation(const QString&,quint16,QIODevice::OpenMode = QIODevice.ReadWrite).
QAbstractSocket.disconnectFromHost (self)
QAbstractSocket.disconnectFromHostImplementation (self)
This method is also a Qt slot with the C++ signature void disconnectFromHostImplementation().
SocketError QAbstractSocket.error (self)
bool QAbstractSocket.flush (self)
bool QAbstractSocket.isSequential (self)
bool QAbstractSocket.isValid (self)
QHostAddress QAbstractSocket.localAddress (self)
int QAbstractSocket.localPort (self)
QHostAddress QAbstractSocket.peerAddress (self)
QString QAbstractSocket.peerName (self)
int QAbstractSocket.peerPort (self)
QNetworkProxy QAbstractSocket.proxy (self)
int QAbstractSocket.readBufferSize (self)
str QAbstractSocket.readData (self, int maxlen)
str QAbstractSocket.readLineData (self, int maxlen)
QAbstractSocket.setLocalAddress (self, QHostAddress)
QAbstractSocket.setLocalPort (self, int)
QAbstractSocket.setPeerAddress (self, QHostAddress)
QAbstractSocket.setPeerName (self, QString)
QAbstractSocket.setPeerPort (self, int)
QAbstractSocket.setProxy (self, QNetworkProxy)
QAbstractSocket.setReadBufferSize (self, int)
bool QAbstractSocket.setSocketDescriptor (self, int, SocketState state = QAbstractSocket.ConnectedState, QIODevice.OpenMode mode = QIODevice.ReadWrite)
QAbstractSocket.setSocketError (self, SocketError)
QAbstractSocket.setSocketOption (self, SocketOption, QVariant)
QAbstractSocket.setSocketState (self, SocketState)
int QAbstractSocket.socketDescriptor (self)
QVariant QAbstractSocket.socketOption (self, SocketOption)
SocketType QAbstractSocket.socketType (self)
SocketState QAbstractSocket.state (self)
bool QAbstractSocket.waitForBytesWritten (self, int msecs = 30000)
bool QAbstractSocket.waitForConnected (self, int msecs = 30000)
bool QAbstractSocket.waitForDisconnected (self, int msecs = 30000)
bool QAbstractSocket.waitForReadyRead (self, int msecs = 30000)
int QAbstractSocket.writeData (self, str)
Qt Signal Documentation
void connected ()
This is the default overload of this signal.
void disconnected ()
This is the default overload of this signal.
void error (QAbstractSocket::SocketError)
This is the default overload of this signal.
void hostFound ()
This is the default overload of this signal.
void proxyAuthenticationRequired (const QNetworkProxy&,QAuthenticator *)
This is the default overload of this signal.
void stateChanged (QAbstractSocket::SocketState)
This is the default overload of this signal.