Class ConnectionStatus
- Namespace
- HotChocolate.AspNetCore.Subscriptions.Protocols
- Assembly
- HotChocolate.AspNetCore.dll
The socket connection initialization status.
public sealed class ConnectionStatus
- Inheritance
-
ConnectionStatus
- Inherited Members
Properties
Accepted
Specifies if the connection is accepted.
public bool Accepted { get; }
Property Value
Extensions
Custom properties.
public IReadOnlyDictionary<string, object?>? Extensions { get; }
Property Value
Message
The connection status message.
public string Message { get; }
Property Value
Methods
Accept()
Accepts the socket connection.
public static ConnectionStatus Accept()
Returns
- ConnectionStatus
The connection accept status.
Reject()
Reject the socket connection with a custom message.
public static ConnectionStatus Reject()
Returns
- ConnectionStatus
The connection reject status.
Reject(IReadOnlyDictionary<string, object?>)
Reject the socket connection with a custom message.
public static ConnectionStatus Reject(IReadOnlyDictionary<string, object?> extensions)
Parameters
extensions
IReadOnlyDictionary<string, object>The custom properties that shall be passed on with the rejection.
Returns
- ConnectionStatus
The connection reject status.
Reject(string)
Reject the socket connection with a custom message.
public static ConnectionStatus Reject(string message)
Parameters
message
stringThe message.
Returns
- ConnectionStatus
The connection reject status.
Reject(string, IReadOnlyDictionary<string, object?>?)
Reject the socket connection with a custom message.
public static ConnectionStatus Reject(string message, IReadOnlyDictionary<string, object?>? extensions)
Parameters
message
stringThe message.
extensions
IReadOnlyDictionary<string, object>The custom properties that shall be passed on with the rejection.
Returns
- ConnectionStatus
The connection reject status.