Setu-TS
    Preparing search index...

    Function selectProtocol

    • Selects the subprotocol to echo for a route.

      With no configured protocols, none is negotiated and none is echoed — echoing a protocol the client did not request breaks conformant clients. With configured protocols, the client's first requested protocol that the route accepts wins; if none match, the handshake is refused.

      Parameters

      • configured: readonly string[]

        The route's accepted protocols

      • requested: readonly string[]

        The protocols the client asked for

      Returns string | false | undefined

      The selected protocol, undefined when none is negotiated, or false to refuse

      0.1.0