#include <tcpsocket.h>
|
| enum | SocketError {
ConnectionRefusedError
, RemoteHostClosedError
, HostNotFoundError
, SocketAccessError
,
SocketResourceError
, SocketTimeoutError
, DatagramTooLargeError
, NetworkError
,
AddressInUseError
, SocketAddressNotAvailableError
, UnsupportedSocketOperationError
, UnfinishedSocketOperationError
,
ProxyAuthenticationRequiredError
, SslHandshakeFailedError
, ProxyConnectionRefusedError
, ProxyConnectionClosedError
,
ProxyConnectionTimeoutError
, ProxyNotFoundError
, ProxyProtocolError
, OperationError
,
SslInternalError
, SslInvalidUserDataError
, TemporaryError
, UnknownSocketError = -1
} |
| |
| enum | SocketState {
UnconnectedState
, HostLookupState
, ConnectingState
, ConnectedState
,
BoundState
, ListeningState
, ClosingState
} |
| |
Definition at line 28 of file tcpsocket.h.
◆ SocketError
| Enumerator |
|---|
| ConnectionRefusedError | |
| RemoteHostClosedError | |
| HostNotFoundError | |
| SocketAccessError | |
| SocketResourceError | |
| SocketTimeoutError | |
| DatagramTooLargeError | |
| NetworkError | |
| AddressInUseError | |
| SocketAddressNotAvailableError | |
| UnsupportedSocketOperationError | |
| UnfinishedSocketOperationError | |
| ProxyAuthenticationRequiredError | |
| SslHandshakeFailedError | |
| ProxyConnectionRefusedError | |
| ProxyConnectionClosedError | |
| ProxyConnectionTimeoutError | |
| ProxyNotFoundError | |
| ProxyProtocolError | |
| OperationError | |
| SslInternalError | |
| SslInvalidUserDataError | |
| TemporaryError | |
| UnknownSocketError | |
Definition at line 31 of file tcpsocket.h.
◆ SocketState
| Enumerator |
|---|
| UnconnectedState | |
| HostLookupState | |
| ConnectingState | |
| ConnectedState | |
| BoundState | |
| ListeningState | |
| ClosingState | |
Definition at line 60 of file tcpsocket.h.
◆ TcpSocket() [1/2]
◆ ~TcpSocket()
| TcpSocket::~TcpSocket |
( |
| ) |
|
|
virtual |
◆ TcpSocket() [2/2]
◆ connected()
| void TcpSocket::connected |
( |
| ) |
|
|
protectedvirtual |
◆ connectToHost()
| void TcpSocket::connectToHost |
( |
const std::string & |
hostName, |
|
|
uint16_t |
port |
|
) |
| |
◆ disconnected()
| void TcpSocket::disconnected |
( |
| ) |
|
|
protectedvirtual |
◆ disconnectFromHost()
| void TcpSocket::disconnectFromHost |
( |
| ) |
|
◆ emitConnected()
| void TcpSocket::emitConnected |
( |
| ) |
const |
|
protected |
◆ emitData()
| void TcpSocket::emitData |
( |
const char * |
data, |
|
|
size_t |
size |
|
) |
| const |
|
protected |
◆ emitDisconnected()
| void TcpSocket::emitDisconnected |
( |
| ) |
const |
|
protected |
◆ emitErrorOccurred()
| void TcpSocket::emitErrorOccurred |
( |
SocketError |
error | ) |
const |
|
protected |
◆ error()
◆ errorOccurred()
◆ errorString()
| std::string TcpSocket::errorString |
( |
| ) |
const |
◆ onConnected()
| void TcpSocket::onConnected |
( |
const std::function< void()> & |
callback | ) |
|
◆ onData()
| void TcpSocket::onData |
( |
const std::function< void(const char *, size_t)> & |
callback | ) |
|
◆ onDisconnected()
| void TcpSocket::onDisconnected |
( |
const std::function< void()> & |
callback | ) |
|
◆ onErrorOccurred()
| void TcpSocket::onErrorOccurred |
( |
const std::function< void(SocketError)> & |
callback | ) |
|
◆ readyRead()
| void TcpSocket::readyRead |
( |
| ) |
|
|
protectedvirtual |
◆ setConnectionTimeout()
| void TcpSocket::setConnectionTimeout |
( |
int |
timeout | ) |
|
◆ setSocketError()
| void TcpSocket::setSocketError |
( |
SocketError |
socketError | ) |
|
|
protected |
◆ socketDescriptor()
| int * TcpSocket::socketDescriptor |
( |
| ) |
const |
◆ waitForConnected()
| bool TcpSocket::waitForConnected |
( |
int |
timeout = 2000 | ) |
const |
◆ waitForDisconnected()
| bool TcpSocket::waitForDisconnected |
( |
int |
timeout = 2000 | ) |
const |
◆ write() [1/2]
| ssize_t TcpSocket::write |
( |
const char * |
data, |
|
|
size_t |
size |
|
) |
| |
◆ write() [2/2]
| ssize_t TcpSocket::write |
( |
const std::string & |
data | ) |
|
◆ TcpSocketPrivate
◆ d_ptr
The documentation for this class was generated from the following files: