Class ServerSentEventsServiceOptions<TServerSentEventsService>
Options for ServerSentEventsService.
Inheritance
System.Object
ServerSentEventsServiceOptions<TServerSentEventsService>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lib.AspNetCore.ServerSentEvents
Assembly: Lib.AspNetCore.ServerSentEvents.dll
Syntax
public class ServerSentEventsServiceOptions<TServerSentEventsService>
where TServerSentEventsService : ServerSentEventsService
Type Parameters
Name | Description |
---|---|
TServerSentEventsService |
Properties
KeepaliveContent
Gets or sets the content for keepalive. If the KeepaliveKind is Comment it will be the content of the comment. If the KeepaliveKind is Event it will be the type of the event.
Declaration
public string KeepaliveContent { get; set; }
Property Value
Type | Description |
---|---|
System.String |
KeepaliveInterval
Gets or sets the keepalive interval (in seconds).
Declaration
public int KeepaliveInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
KeepaliveKind
Gets or sets the kind of content for keepalive.
Declaration
public ServerSentEventsKeepaliveKind KeepaliveKind { get; set; }
Property Value
Type | Description |
---|---|
ServerSentEventsKeepaliveKind |
KeepaliveMode
Gets or sets the keepalive sending mode.
Declaration
public ServerSentEventsKeepaliveMode KeepaliveMode { get; set; }
Property Value
Type | Description |
---|---|
ServerSentEventsKeepaliveMode |
OnClientConnected
Called when client has connected. This can be used to add client to groups.
Declaration
public Action<IServerSentEventsService, ServerSentEventsClientConnectedArgs> OnClientConnected { get; set; }
Property Value
Type | Description |
---|---|
System.Action<IServerSentEventsService, ServerSentEventsClientConnectedArgs> |
OnClientDisconnected
Called when client has disconnected.
Declaration
public Action<IServerSentEventsService, ServerSentEventsClientDisconnectedArgs> OnClientDisconnected { get; set; }
Property Value
Type | Description |
---|---|
System.Action<IServerSentEventsService, ServerSentEventsClientDisconnectedArgs> |
ReconnectInterval
Gets or sets the interval after which clients will attempt to reestablish failed connections.
Declaration
public uint? ReconnectInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt32> |