MCPcopy Create free account
hub / github.com/XMuli/ChineseChess / slotNewConnection

Method slotNewConnection

NetworkGame.cpp:196–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void NetworkGame::slotNewConnection()
197{
198 if(m_tcpSocket) return;
199
200 static std::once_flag flag;
201 std::call_once(flag, [&]() {
202 QString text = QString("Client Connection Successful");
203 ui->labConnectStatus->setText(text);
204 });
205
206
207 if (m_tcpServer) {
208 m_tcpSocket = m_tcpServer->nextPendingConnection();
209 connect(m_tcpSocket, SIGNAL(readyRead()), this, SLOT(slotRecv()));
210 }
211}
212
213void NetworkGame::slotRecv()
214{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected