ignore new data on disposed socket

This commit is contained in:
Hiroshi Horie
2021-12-23 03:06:43 +07:00
parent 8f0e73487b
commit be01553ac2
4 changed files with 29 additions and 22 deletions
+2 -2
View File
@@ -1,3 +1,4 @@
import '../support/disposable.dart';
import 'websocket/io.dart' if (dart.library.html) 'websocket/web.dart';
class WebSocketException implements Exception {
@@ -29,9 +30,8 @@ class WebSocketEventHandlers {
});
}
abstract class LiveKitWebSocket {
abstract class LiveKitWebSocket extends Disposable {
void send(List<int> data);
Future<void> dispose();
static Future<LiveKitWebSocket> connect(
Uri uri, [