Dela via


HubOptions Class

Definition

Options used to configure hub instances.

public ref class HubOptions
public class HubOptions
type HubOptions = class
Public Class HubOptions
Inheritance
HubOptions
Derived

Constructors

HubOptions()

Properties

ClientTimeoutInterval

Gets or sets the time window clients have to send a message before the server closes the connection. The default timeout is 30 seconds.

DisableImplicitFromServicesParameters

When false, IServiceProviderIsService determines if a Hub method parameter will be injected from the DI container. Parameters can be explicitly marked with an attribute that implements IFromServiceMetadata with or without this option set.

EnableDetailedErrors

Gets or sets a value indicating whether detailed error messages are sent to the client. Detailed error messages include details from exceptions thrown on the server.

HandshakeTimeout

Gets or sets the interval used by the server to timeout incoming handshake requests by clients. The default timeout is 15 seconds.

KeepAliveInterval

Gets or sets the interval used by the server to send keep alive pings to connected clients. The default interval is 15 seconds.

MaximumParallelInvocationsPerClient

By default a client is only allowed to invoke a single Hub method at a time. Changing this property will allow clients to invoke multiple methods at the same time before queueing.

MaximumReceiveMessageSize

Gets or sets the maximum message size of a single incoming hub message. The default is 32KB.

StatefulReconnectBufferSize

Gets or sets the maximum bytes to buffer per connection when using stateful reconnect.

StreamBufferCapacity

Gets or sets the max buffer size for client upload streams. The default size is 10.

SupportedProtocols

Gets or sets a collection of supported hub protocol names.

Extension Methods

AddFilter(HubOptions, IHubFilter)

Adds an instance of an IHubFilter to the HubOptions.

AddFilter(HubOptions, Type)

Adds an IHubFilter type to the HubOptions that will be resolved via DI or type activated.

AddFilter<TFilter>(HubOptions)

Adds an IHubFilter type to the HubOptions that will be resolved via DI or type activated.

Applies to