PhoenixLink constructor

PhoenixLink({
  1. required PhoenixSocket socket,
  2. required PhoenixChannel channel,
  3. ResponseParser parser = const ResponseParser(),
  4. RequestSerializer serializer = const RequestSerializer(),
})

Creates a new PhoenixLink using an established PhoenixChannel channel.

You can use the static createChannel method to create a PhoenixChannel from a websocket URI and optional parameters (e.g. for authentication)

Implementation

PhoenixLink({
  required this.socket,
  required this.channel,
  ResponseParser parser = const ResponseParser(),
  RequestSerializer serializer = const RequestSerializer(),
})  : _serializer = serializer,
      _parser = parser;