equal
deleted
inserted
replaced
83 void HWNewNet::Connect(const QString & hostName, quint16 port, bool useTls, const QString & nick) |
83 void HWNewNet::Connect(const QString & hostName, quint16 port, bool useTls, const QString & nick) |
84 { |
84 { |
85 netClientState = Connecting; |
85 netClientState = Connecting; |
86 mynick = nick; |
86 mynick = nick; |
87 myhost = hostName + QString(":%1").arg(port); |
87 myhost = hostName + QString(":%1").arg(port); |
88 NetSocket.connectToHost(hostName, port); |
88 if (useTls) |
|
89 { |
|
90 NetSocket.connectToHostEncrypted(hostName, port); |
|
91 if (!NetSocket.waitForEncrypted()) |
|
92 { |
|
93 qWarning("Handshake failed"); |
|
94 } |
|
95 } |
|
96 else |
|
97 { |
|
98 NetSocket.connectToHost(hostName, port); |
|
99 } |
89 } |
100 } |
90 |
101 |
91 void HWNewNet::Disconnect() |
102 void HWNewNet::Disconnect() |
92 { |
103 { |
93 if (m_game_connected) |
104 if (m_game_connected) |