summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/remoteserver.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-02-10 16:21:26 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2015-02-20 10:22:28 +0000
commitd6bca86cad962a0078c2a8111133cff123f1ba0a (patch)
tree0f8cf9863c04675c24efe2bf6b0aa023a56a0f4c /src/libs/installer/remoteserver.cpp
parent0ff36e52afb503a99c8fded093d25321a46b3d19 (diff)
Use local sockets for client-server communication
Change-Id: I12bfef671ab31ae9fb8c4bb02776517e7f434d27 Task-number: QTIFW-228 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/remoteserver.cpp')
-rw-r--r--src/libs/installer/remoteserver.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libs/installer/remoteserver.cpp b/src/libs/installer/remoteserver.cpp
index f95ca6553..b5f077b7e 100644
--- a/src/libs/installer/remoteserver.cpp
+++ b/src/libs/installer/remoteserver.cpp
@@ -68,7 +68,7 @@ RemoteServer::~RemoteServer()
void RemoteServer::start()
{
Q_D(RemoteServer);
- if (d->m_tcpServer)
+ if (d->m_localServer)
return;
#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
@@ -79,11 +79,11 @@ void RemoteServer::start()
fclose(stderr);
#endif
- d->m_tcpServer = new TcpServer(d->m_port, d->m_key);
- d->m_tcpServer->moveToThread(&d->m_thread);
- connect(&d->m_thread, SIGNAL(finished()), d->m_tcpServer, SLOT(deleteLater()));
- connect(d->m_tcpServer, SIGNAL(newIncomingConnection()), this, SLOT(restartWatchdog()));
- connect(d->m_tcpServer, SIGNAL(shutdownRequested()), this, SLOT(deleteLater()));
+ d->m_localServer = new LocalServer(d->m_socketName, d->m_key);
+ d->m_localServer->moveToThread(&d->m_thread);
+ connect(&d->m_thread, SIGNAL(finished()), d->m_localServer, SLOT(deleteLater()));
+ connect(d->m_localServer, SIGNAL(newIncomingConnection()), this, SLOT(restartWatchdog()));
+ connect(d->m_localServer, SIGNAL(shutdownRequested()), this, SLOT(deleteLater()));
d->m_thread.start();
if (d->m_mode == Protocol::Mode::Production) {
@@ -93,24 +93,24 @@ void RemoteServer::start()
}
/*!
- Initializes the server with \a port, the port to listen on, with \a key, the key the client
+ Initializes the server with \a socketName, with \a key, the key the client
needs to send to authenticate with the server, and \a mode.
*/
-void RemoteServer::init(quint16 port, const QString &key, Protocol::Mode mode)
+void RemoteServer::init(const QString &socketName, const QString &key, Protocol::Mode mode)
{
Q_D(RemoteServer);
- d->m_port = port;
+ d->m_socketName = socketName;
d->m_key = key;
d->m_mode = mode;
}
/*!
- Returns the port the server is listening on.
+ Returns the socket name the server is listening on.
*/
-quint16 RemoteServer::port() const
+QString RemoteServer::socketName() const
{
Q_D(const RemoteServer);
- return d->m_port;
+ return d->m_socketName;
}
/*!