T
Thom Little
I want to check if a remote server is healthy. For FTP and HTTP ports I
use ...
public static string Connect( string hoist, int port )
{
try
{
IPAddress[] ipa = Dns.GetHostAddresses( host );
Socket s = new Socket( AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp );
s.Connect( ipa[0], port );
}
catch
{
return (host + ":" + port.ToString( ) + " " );
}
return ( null );
}
.... this same technique for SMTP and POP3 always reports success.
How can I remotely test SMTP and POP3 to determine if they are healthy
(i.e., not hung)?
_______________________________________________
Thom Little www.tlanet.net Thom Little Associates, Ltd.
use ...
public static string Connect( string hoist, int port )
{
try
{
IPAddress[] ipa = Dns.GetHostAddresses( host );
Socket s = new Socket( AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp );
s.Connect( ipa[0], port );
}
catch
{
return (host + ":" + port.ToString( ) + " " );
}
return ( null );
}
.... this same technique for SMTP and POP3 always reports success.
How can I remotely test SMTP and POP3 to determine if they are healthy
(i.e., not hung)?
_______________________________________________
Thom Little www.tlanet.net Thom Little Associates, Ltd.