Class WebSocketHealthChecker
- Namespace
- AppHealthMonitor
- Assembly
- AppHealthMonitor.dll
Checks port health by attempting to establish a WebSocket connection.
Verifies the endpoint is functional by confirming the connection reaches Open.
The close handshake is intentionally skipped; the using block disposes the socket,
which is faster and equally valid for health probing.
public sealed class WebSocketHealthChecker : IHealthChecker
- Inheritance
-
WebSocketHealthChecker
- Implements
- Inherited Members
Properties
PortType
Gets the port type this health checker handles.
public PortType PortType { get; }
Property Value
Methods
IsResponsiveAsync(string, int, int, CancellationToken)
Checks if the specified port is responsive.
public Task<bool> IsResponsiveAsync(string host, int port, int timeoutMilliseconds, CancellationToken cancellationToken)
Parameters
hoststringThe hostname or IP address to check.
portintThe port number to check.
timeoutMillisecondsintThe timeout in milliseconds before the check is considered failed.
cancellationTokenCancellationTokenToken to signal cancellation of the check.