This repository has been archived on 2025-08-25. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Seshat/lib/data/services/websocket_client.dart

16 lines
371 B
Dart

import 'package:seshat/config/constants.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
class WebsocketClient {
Future<Stream<dynamic>> connect() async {
final channel = WebSocketChannel.connect(
Uri.parse("wss://$apiBasePath/ws"),
);
await channel.ready;
channel.sink.add("json-token: ");
return channel.stream;
}
}