connect method
Stream<SSEResponse>
connect(
- String connectionId,
- SSERequest request, {
- dynamic fromJson(
- dynamic
override
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
@override
Stream<SSEResponse> connect(String connectionId, SSERequest request,
{Function(dynamic)? fromJson}) {
return subscribeToSSE(connectionId, request, fromJson: fromJson);
}