sse_channel2 0.0.4 sse_channel2: ^0.0.4 copied to clipboard
StreamChannel wrappers for Server Sent Events.
sse_channel #
The sse_channel
package provides StreamChannel
wrappers for Server Sent Event connections.
import 'package:sse_channel2/sse_channel.dart';
void main() {
final channel =
SseChannel.connect(Uri.parse('http://127.0.0.1:8080/sseHandler'));
channel.stream.listen((message) {
print(message);
});
channel.sink.add('test');
}