11/// If you change this file, you should apply the same changes to the 'parse_websocket_io.dart' file
22library ;
33
4- <<<<<< < HEAD
5- ====== =
6- // ignore: deprecated_member_use
7- import 'dart:html' as html;
8- >>>>>> > parse- community/ master
4+
95
106import 'dart:async' ;
117
12- import 'package:socket_io_client/socket_io_client.dart' as IO ;
8+ import 'package:socket_io_client/socket_io_client.dart' as io ;
139import 'package:web_socket_channel/html.dart' ;
1410import 'package:web_socket_channel/web_socket_channel.dart' ;
1511
@@ -20,8 +16,7 @@ class WebSocket {
2016 static const int open = 1 ;
2117 static const int closing = 2 ;
2218 static const int closed = 3 ;
23-
24- final IO .Socket _webSocket;
19+ final io.Socket _webSocket;
2520
2621 static final Map <String , int > _states= {
2722 'closed' : 3 ,
@@ -31,9 +26,9 @@ class WebSocket {
3126 };
3227 static Future <WebSocket > connect (String liveQueryURL) async {
3328 Completer <WebSocket > completer= Completer ();
34- final IO .Socket webSocket = IO .io (
29+ final io .Socket webSocket = io .io (
3530 liveQueryURL,
36- IO .OptionBuilder ().setTransports (['websocket' ]).enableReconnection ().build ()
31+ io .OptionBuilder ().setTransports (['websocket' ]).enableReconnection ().build ()
3732 );
3833 webSocket.connect ();
3934 webSocket.onConnect ((handler){
@@ -53,8 +48,7 @@ class WebSocket {
5348 }
5449
5550 int get readyState => _states[_webSocket.io.readyState]! ;
56-
57- Future <IO .Socket > close () async {
51+ Future <io.Socket > close () async {
5852 return _webSocket.disconnect ();
5953 }
6054
0 commit comments