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



url
URL to ping
timeoutMilliseconds
The timeout in milliseconds.
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 _
) As Boolean
Visual Basic (Usage)Copy Code
Dim url As String
Dim timeoutMilliseconds As Integer
Dim value As Boolean
 
value = HttpFns.PingServer(url, timeoutMilliseconds)
C# 
public static bool PingServer( 
   string url,
   int timeoutMilliseconds
)
C++/CLI 
public:
static bool PingServer( 
   String^ url,
   int timeoutMilliseconds
) 

Parameters

url
URL to ping
timeoutMilliseconds
The timeout in milliseconds.

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.