diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/resourceaccess.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/resourceaccess.cpp b/client/resourceaccess.cpp index 7c92331..2972316 100644 --- a/client/resourceaccess.cpp +++ b/client/resourceaccess.cpp | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "resourceaccess.h" | 1 | #include "resourceaccess.h" |
2 | 2 | ||
3 | #include "common/console.h" | 3 | #include "common/console.h" |
4 | #include "common/commands.h" | ||
4 | 5 | ||
5 | #include <QDebug> | 6 | #include <QDebug> |
6 | #include <QProcess> | 7 | #include <QProcess> |
@@ -64,7 +65,16 @@ void ResourceAccess::connected() | |||
64 | { | 65 | { |
65 | m_startingProcess = false; | 66 | m_startingProcess = false; |
66 | Console::main()->log(QString("Connected: %1").arg(m_socket->fullServerName())); | 67 | Console::main()->log(QString("Connected: %1").arg(m_socket->fullServerName())); |
67 | m_socket->write("100 command " + QString::number((long long)this).toLatin1()); | 68 | |
69 | { | ||
70 | const QByteArray name = QString::number((long long)this).toLatin1(); | ||
71 | const int commandId = Commands::HandshakeCommand; | ||
72 | const int dataSize = name.size(); | ||
73 | m_socket->write((const char*)&commandId, sizeof(int)); | ||
74 | m_socket->write((const char*)&dataSize, sizeof(int)); | ||
75 | m_socket->write(name.data(), name.size()); | ||
76 | } | ||
77 | |||
68 | emit ready(true); | 78 | emit ready(true); |
69 | } | 79 | } |
70 | 80 | ||