Setu-TS
    Preparing search index...

    Function buildContext

    • Builds the context handed to onOpen from the upgrade request.

      Parameters

      • request: Request

        The upgrade request

      • protocol: string | undefined

        The negotiated subprotocol, when one was selected

      • Optionalprincipal: IPrincipal

        The authenticated principal, when one authenticated the upgrade. When absent the user key is omitted entirely rather than set to undefined, keeping the context exactOptionalPropertyTypes-clean: 'user' in context is false for an anonymous connection.

      Returns WebSocketConnectionContext

      The connection context

      0.1.0