PHP Code:
public bool Connect(string IP, int Port)
{
int tries = 0;
IPAddress ipAddress = IPAddress.Parse(IP);
IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, Port);
while (tries == 0 && !Connection.Connected)
{
try
{
Connection.BeginConnect(ipEndPoint, new AsyncCallback(AsyncConnect), null);
if (Connection.Connected)
{
return true;
}
}
catch
{
System.Threading.Thread.Sleep(20000);
}
}
return false;
}
PHP Code:
public bool Connect(string IP, int Port)
{
int tries = 0;
IPAddress ipAddress = IPAddress.Parse(IP);
IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, Port);
while (tries == 0 && !Connection.Connected)
{
try
{
HashSocket.Connect(ipEndPoint);
if (HashSocket.Connected)
{
Connection.BeginConnect(ipEndPoint, new AsyncCallback(AsyncConnect), null);
return true;
if (Connection.Connected)
{
return true;
}
}
}
catch
{
System.Threading.Thread.Sleep(20000);
}
}
return false;
}






