var is_success = false;
var remote_address = "216.58.209.174";
var port = 443;
try{
var connsock = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp);
connsock.SetSocketOption(System.Net.Sockets.SocketOptionLevel.Socket, System.Net.Sockets.SocketOptionName.SendTimeout, 200);
System.Threading.Thread.Sleep(500);
var hip = System.Net.IPAddress.Parse(remote_address);
var ipep = new System.Net.IPEndPoint(hip, port);
connsock.Connect(ipep);
if (connsock.Connected)
is_success = true;
connsock.Close();
}
catch (Exception e){
project.SendErrorToLog(e.Message);
is_success = false;
}
return is_success;