67 PeerWireClient *client = |
67 PeerWireClient *client = |
68 new PeerWireClient(ConnectionManager::instance()->clientId(), this); |
68 new PeerWireClient(ConnectionManager::instance()->clientId(), this); |
69 |
69 |
70 if (client->setSocketDescriptor(socketDescriptor)) { |
70 if (client->setSocketDescriptor(socketDescriptor)) { |
71 if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) { |
71 if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) { |
72 connect(client, SIGNAL(infoHashReceived(const QByteArray &)), |
72 connect(client, SIGNAL(infoHashReceived(QByteArray)), |
73 this, SLOT(processInfoHash(const QByteArray &))); |
73 this, SLOT(processInfoHash(QByteArray))); |
74 connect(client, SIGNAL(error(QAbstractSocket::SocketError)), |
74 connect(client, SIGNAL(error(QAbstractSocket::SocketError)), |
75 this, SLOT(removeClient())); |
75 this, SLOT(removeClient())); |
76 RateController::instance()->addSocket(client); |
76 RateController::instance()->addSocket(client); |
77 ConnectionManager::instance()->addConnection(client); |
77 ConnectionManager::instance()->addConnection(client); |
78 return; |
78 return; |