Hello, I am working with Qt so sorry if that brings other issues
But I am working through the stage to perform the handshake and cannot connect to the peer correctly, I am using a QTcpSocket and the same ip:socket as in the example from the previous step, I have tried all 3 peers but get the same result, I am not very familiar with TcpSockets and networking stuff so not entirely sure where the fault might be
also, when I set waitForConnected to 10000 I get “connection refused”
this is my debugging output:
Peer: “165.232.35.114” : 65523
Peer: “165.232.41.73” : 51288
Peer: “165.232.38.164” : 65513
Could not connect: "Socket operation timed out"
This is my code:
void Client::connectPeers(QList<QPair<QString, quint16>> peerList){
socket→connectToHost(peerList[0].first, peerList[0].second)
if(!socket→waitForConnected(5000)){
qWarning() <<“could not connect: “ << socket→errorString();}
}