bool Client::ConnectToServer(string ip)
{
// [TODO] If this returns true it doesn't mean that the connection was successful.
if(mRaknetPeer->Startup(1, &RakNet::SocketDescriptor(), 1) == RakNet::RAKNET_STARTED) {
if(mRaknetPeer->Connect(ip.c_str(), 27020, NULL, NULL) == RakNet::CONNECTION_ATTEMPT_STARTED)
return true;
}
bool Client::ConnectToServer(string ip) { // [TODO] If this returns true it doesn't mean that the connection was successful. if(mRaknetPeer->Startup(1, &RakNet::SocketDescriptor(), 1) == RakNet::RAKNET_STARTED) { if(mRaknetPeer->Connect(ip.c_str(), 27020, NULL, NULL) == RakNet::CONNECTION_ATTEMPT_STARTED)
return true; }
}