WebSocketTransformer({dynamic protocolSelector(List<String> protocols)})

Create a new WebSocketTransformer.

If protocolSelector is provided, protocolSelector will be called to select what protocol to use, if any were provided by the client. protocolSelector is should return either a String or a Future completing with a String. The String must exist in the list of protocols.

Source

factory WebSocketTransformer({protocolSelector(List<String> protocols)})
    => new _WebSocketTransformerImpl(protocolSelector);