1 #ifndef VFS_TCP_CLIENT_H
2 #define VFS_TCP_CLIENT_H
5 #include <QHostAddress>
8 #include <QSslConfiguration>
16 #define MAX_MESSAGE_SIZE 2147483648
25 explicit VFS_tcp_client(QTcpSocket *socket,
bool ssl=
false, QSslConfiguration sslConfiguration=QSslConfiguration());
26 explicit VFS_tcp_client(QTcpSocket *socket,
bool ssl=
false, QString sslCertPath=
"");
27 explicit VFS_tcp_client(QString address, quint16 port,
bool ssl=
false, QString sslCertPath=
"");
57 void error(QAbstractSocket::SocketError);
67 void sslErrors(
const QList<QSslError> &errors);
VFS_node is the base class from which all other VFS_node classes derive.
The base class for all requests between nodes.
void error(QAbstractSocket::SocketError)
Emitted when a socket error occurs.
void connected()
Emitted when a connection has been made.
QString _address
The address resolved by peerAddress(), or the address to connect to.
MESSAGE_SIZE _messageSize
The message size received. Will wait for this many bytes before emitting messageReady.
void sslErrors(const QList< QSslError > &errors)
VFS_tcp_client::sslErrors.
void sslReady()
Signal that an SSL connnection has been established.
QTcpSocket * _socket
The socket connection.
VFS_tcp_client(QTcpSocket *socket, bool ssl=false, QSslConfiguration sslConfiguration=QSslConfiguration())
VFS_tcp_client constructor for client mode.
virtual QString reportDetails()
Report data about this client.
void readyMessage(QByteArray message)
Emitted when a message is ready for processing.
virtual bool isContainer()
DOCME.
bool _initialized
Has this node been initialized?
void peerVerifyError(const QSslError &error)
VFS_tcp_client::peerVerifyError.
virtual void init()
DOCME.
virtual void close()
DOCME.
quint16 _port
The port to connect to.
QString _sslCertPath
ssl cert file path.
virtual void write(VFS_request *r)
DOCME.
virtual void writeMessage(QByteArray data)
DOCME.
void modeChanged(QSslSocket::SslMode mode)
A slot for when the SSL mode has changed.
void disconnected()
Emitted when a connection has been lost.
void moreToRead()
Emitted when an incoming message has additional data.
virtual ~VFS_tcp_client()
Open a listening TCP port for other clients to connect to.