IdeaBlade DevForce 2010 Help Reference
PingServer(String,Int32,String,Int32) Method
See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core Namespace > HttpFns Class > PingServer Method : PingServer(String,Int32,String,Int32) Method



url
URL to ping
timeoutMilliseconds
The timeout in milliseconds.
proxyName
The name of the proxy host.
proxyPort
The port on the proxy host to use.
Determine if the server exists and is responding.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function PingServer( _
   ByVal url As String, _
   ByVal timeoutMilliseconds As Integer, _
   ByVal proxyName As String, _
   ByVal proxyPort As Integer _
) As Boolean
Visual Basic (Usage)Copy Code
Dim url As String
Dim timeoutMilliseconds As Integer
Dim proxyName As String
Dim proxyPort As Integer
Dim value As Boolean
 
value = HttpFns.PingServer(url, timeoutMilliseconds, proxyName, proxyPort)
C# 
public static bool PingServer( 
   string url,
   int timeoutMilliseconds,
   string proxyName,
   int proxyPort
)
C++/CLI 
public:
static bool PingServer( 
   String^ url,
   int timeoutMilliseconds,
   String^ proxyName,
   int proxyPort
) 

Parameters

url
URL to ping
timeoutMilliseconds
The timeout in milliseconds.
proxyName
The name of the proxy host.
proxyPort
The port on the proxy host to use.

Return Value

True if the server responded

Remarks

A timeoutMilliseconds of 0 indicates that the .NET connection default of 100 seconds should be used. If a negative timeout value is provided, then the server is not pinged.

False is returned if the server request failed due to a timeout or DNS failure; true is returned otherwise.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.