 | RestClientExtensionsTryPing Method |
Attempts to send an HTTP PING to the rest client service. If successful, the reported time drift and latency are returned.
Namespace: SanteDB.Core.HttpAssembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntaxpublic static bool TryPing(
this IRestClient restClient,
out long latencyMs,
out TimeSpan timeDrift
)
<ExtensionAttribute>
Public Shared Function TryPing (
restClient As IRestClient,
<OutAttribute> ByRef latencyMs As Long,
<OutAttribute> ByRef timeDrift As TimeSpan
) As Boolean
public:
[ExtensionAttribute]
static bool TryPing(
IRestClient^ restClient,
[OutAttribute] long long% latencyMs,
[OutAttribute] TimeSpan% timeDrift
)
[<ExtensionAttribute>]
static member TryPing :
restClient : IRestClient *
latencyMs : int64 byref *
timeDrift : TimeSpan byref -> bool Parameters
- restClient IRestClient
- The rest client to use to send the PING request.
- latencyMs Int64
- When successful, contains the latency in whole milliseconds that the request took. If the function fails, the result will be -1.
- timeDrift TimeSpan
- When successful, contains the reported time difference between the client and server. No processing takes place to increase the accuracy of this value. If the request fails, the result will be -1.
Return Value
BooleanTrue when the PING request succeeds, false otherwise.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IRestClient. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions
See Also