connect abstract method

Stream<SSEResponse> connect(
  1. String connectionId,
  2. SSERequest request, {
  3. dynamic fromJson(
    1. dynamic
    )?,
})

Establishes a connection with the server.

connectionId is the unique identifier for the connection. request is the SSE request containing the connection details. fromJson is an optional function to parse the JSON data.

Returns a Stream of SSEResponse objects.

Implementation

Stream<SSEResponse> connect(String connectionId, SSERequest request,
    {Function(dynamic)? fromJson});