public static async Task<bool> JoinServer(string IpAddress)
{
Client = new TcpClient();
if (IPEndPoint.TryParse(IpAddress, out IPEndPoint Result))
{
Result.Port = Port;
await Client.ConnectAsync(Result);
return true;
}
else
{
Client = null;
return false;
}
}
public static async Task<bool> JoinServer(string IpAddress)
{
Client = new TcpClient();
if (IPEndPoint.TryParse(IpAddress, out IPEndPoint Result))
{
Result.Port = Port;
await Client.ConnectAsync(Result);
return true;
}
else
{
Client = null;
return false;
}
}