Field Notes
    Preparing search index...

    Interface CreateSyncServerOptions

    interface CreateSyncServerOptions {
        authenticate?: Authenticate;
        authority?: AuthorityOptions;
        authorize?: Authorize;
        authorizeLayer?: AuthorizeLayer;
        backend?: HubBackend;
        byteBurst?: number;
        bytesPerSecond?: number;
        canRead?: CanRead;
        canReadOwnerId?: CanReadOwnerId;
        clientAddress?: (req: IncomingMessage) => string | undefined;
        fanout?: HubFanout;
        framePolicy?: FramePolicy;
        heartbeatIntervalMs?: number;
        instanceId?: string;
        maxConnectionsPerIp?: number;
        maxConnectionsPerRoom?: number;
        maxJsonDepth?: number;
        maxMessageBytes?: number;
        maxPendingAuthBytes?: number;
        maxPendingAuthMessages?: number;
        maxPresenceBytes?: number;
        maxPresenceLanes?: number;
        messageBurst?: number;
        messagesPerSecond?: number;
        opBurst?: number;
        opsPerSecond?: number;
        plugins?: readonly ServerSyncPlugin[];
        port?: number;
        presenceThrottleMs?: number;
        resolveAudience?: ResolveAudience;
        roomIdleTimeoutMs?: number;
        server?: Server<typeof IncomingMessage, typeof ServerResponse>;
        shutdownGraceMs?: number;
        tombstoneRetentionMs?: number;
    }
    Index
    authenticate?: Authenticate
    authority?: AuthorityOptions
    authorize?: Authorize
    authorizeLayer?: AuthorizeLayer
    backend?: HubBackend
    byteBurst?: number

    Inbound byte spike allowance per connection; a frame larger than this is never admitted.

    bytesPerSecond?: number

    Sustained inbound bytes per second per connection (token bucket).

    canRead?: CanRead
    canReadOwnerId?: CanReadOwnerId
    clientAddress?: (req: IncomingMessage) => string | undefined

    Resolves the client address the per-IP cap keys on. Defaults to the socket's remote address; behind a trusted proxy read the forwarded header here. Returning undefined or '' exempts the connection from the per-IP cap.

    fanout?: HubFanout
    framePolicy?: FramePolicy

    Opts admitted sockets into bounded frame transport and optional per-frame authorization.

    heartbeatIntervalMs?: number
    instanceId?: string
    maxConnectionsPerIp?: number

    Concurrent sockets per client address; Infinity disables the cap.

    maxConnectionsPerRoom?: number

    Concurrent sockets per room, pending-auth sockets included; Infinity disables the cap.

    maxJsonDepth?: number
    maxMessageBytes?: number
    maxPendingAuthBytes?: number
    maxPendingAuthMessages?: number
    maxPresenceBytes?: number
    maxPresenceLanes?: number
    messageBurst?: number
    messagesPerSecond?: number
    opBurst?: number

    Element op spike allowance per connection.

    opsPerSecond?: number

    Sustained element ops per second per connection, each op of a batch counted; over budget closes 4408.

    plugins?: readonly ServerSyncPlugin[]
    port?: number
    presenceThrottleMs?: number
    resolveAudience?: ResolveAudience
    roomIdleTimeoutMs?: number

    Opt-in: drops a room's in-process memory after it has had no local connection for this long.

    server?: Server<typeof IncomingMessage, typeof ServerResponse>
    shutdownGraceMs?: number
    tombstoneRetentionMs?: number

    Tombstone retention of the default MemoryHubBackend; a custom backend takes its own.