feat: added authentification and redirection
This commit is contained in:
parent
1c9c5ce5fe
commit
ef641d4023
24 changed files with 731 additions and 173 deletions
|
|
@ -1,10 +1,16 @@
|
|||
import 'package:seshat/config/constants.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
class WebsocketClient {
|
||||
static const String _host = "ws://bal.ninjdai.fr:3000";
|
||||
Future<Stream<dynamic>> connect() async {
|
||||
final channel = WebSocketChannel.connect(
|
||||
Uri.parse("wss://$apiBasePath/ws"),
|
||||
);
|
||||
|
||||
await channel.ready;
|
||||
|
||||
channel.sink.add("json-token: ");
|
||||
|
||||
Stream<dynamic> connect() {
|
||||
final channel = WebSocketChannel.connect(Uri.parse("$_host/ws"));
|
||||
return channel.stream;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue