#include <VP1TcpServer.h>
Definition at line 22 of file VP1TcpServer.h.
◆ VP1TcpServer()
VP1TcpServer::VP1TcpServer |
( |
| ) |
|
◆ ~VP1TcpServer()
VP1TcpServer::~VP1TcpServer |
( |
| ) |
|
|
virtual |
◆ acceptConnection
void VP1TcpServer::acceptConnection |
( |
| ) |
|
|
privateslot |
Definition at line 107 of file VP1TcpServer.cxx.
111 QTcpSocket * socket =
m_d->
tcpserver.nextPendingConnection();
121 connect(socket, SIGNAL(
error(QAbstractSocket::SocketError)),
this, SLOT(
handleError(QAbstractSocket::SocketError)));
122 connect(socket, SIGNAL(disconnected()),socket, SLOT(deleteLater()));
◆ close
void VP1TcpServer::close |
( |
| ) |
|
|
slot |
◆ handleError
void VP1TcpServer::handleError |
( |
QAbstractSocket::SocketError |
se | ) |
|
|
privateslot |
Definition at line 128 of file VP1TcpServer.cxx.
130 if (
se == QTcpSocket::RemoteHostClosedError)
135 if (socket->state()!=QAbstractSocket::UnconnectedState) {
136 socket->disconnectFromHost();
◆ isListening()
bool VP1TcpServer::isListening |
( |
| ) |
|
◆ listen()
bool VP1TcpServer::listen |
( |
QString & |
err, |
|
|
const quint16 & |
port = 4747 |
|
) |
| |
◆ listenStateChanged
void VP1TcpServer::listenStateChanged |
( |
bool |
| ) |
|
|
signal |
◆ listenStateMightHaveChanged
void VP1TcpServer::listenStateMightHaveChanged |
( |
| ) |
|
|
privateslot |
◆ port()
quint16 VP1TcpServer::port |
( |
| ) |
const |
◆ readData
void VP1TcpServer::readData |
( |
| ) |
|
|
privateslot |
Definition at line 143 of file VP1TcpServer.cxx.
148 if (socket->state()!=QAbstractSocket::ConnectedState) {
153 QDataStream in(socket);
154 in.setVersion(QDataStream::Qt_4_2);
158 if (socket->bytesAvailable() < (
int)
sizeof(quint16))
172 socket->disconnectFromHost();
176 if (
data.startsWith(
"VP1ExternalRequest")) {
178 if (request.isValid()) {
◆ receivedExternalRequest
◆ socketDestroyed
void VP1TcpServer::socketDestroyed |
( |
QObject * |
obj | ) |
|
|
privateslot |
◆ m_d
The documentation for this class was generated from the following files: