18 #include <QDataStream>
44 QTimer *
timer =
new QTimer(
this);
94 while (
it.hasNext()) {
96 QTcpSocket * socket =
it.key();
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()));
130 if (
se == QTcpSocket::RemoteHostClosedError)
135 if (socket->state()!=QAbstractSocket::UnconnectedState) {
136 socket->disconnectFromHost();
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")) {
189 QTcpSocket * socket =
static_cast<QTcpSocket *
>(o);
198 QTcpSocket * socket =
static_cast<QTcpSocket *
>(
obj);