void FortuneServer::incomingConnection(int socketDescriptor)
{
TcpClientSocket *clientConnection=new TcpClientSocket(this);
if (!clientConnection->setSocketDescriptor(socketDescriptor))
{
return;
}
QString Iip=clientConnection->peerAddress ().toString();获取客户端ip
qDebug()<<Iip;
}
{
TcpClientSocket *clientConnection=new TcpClientSocket(this);
if (!clientConnection->setSocketDescriptor(socketDescriptor))
{
return;
}
QString Iip=clientConnection->peerAddress ().toString();获取客户端ip
qDebug()<<Iip;
}