Showing
1 changed file
with
39 additions
and
0 deletions
1 | +import './socket_notifier.dart'; | ||
2 | + | ||
1 | class BaseWebSocket { | 3 | class BaseWebSocket { |
2 | String url; | 4 | String url; |
3 | Duration ping; | 5 | Duration ping; |
@@ -10,7 +12,44 @@ class BaseWebSocket { | @@ -10,7 +12,44 @@ class BaseWebSocket { | ||
10 | throw 'To use sockets you need dart:io or dart:html'; | 12 | throw 'To use sockets you need dart:io or dart:html'; |
11 | } | 13 | } |
12 | 14 | ||
15 | + Future connect() async { | ||
16 | + throw 'To use sockets you need dart:io or dart:html'; | ||
17 | + } | ||
18 | + | ||
19 | + void onOpen(OpenSocket fn) { | ||
20 | + throw 'To use sockets you need dart:io or dart:html'; | ||
21 | + } | ||
22 | + | ||
23 | + void onClose(CloseSocket fn) { | ||
24 | + throw 'To use sockets you need dart:io or dart:html'; | ||
25 | + } | ||
26 | + | ||
27 | + void onError(CloseSocket fn) { | ||
28 | + throw 'To use sockets you need dart:io or dart:html'; | ||
29 | + } | ||
30 | + | ||
31 | + void onMessage(MessageSocket fn) { | ||
32 | + throw 'To use sockets you need dart:io or dart:html'; | ||
33 | + } | ||
34 | + | ||
35 | + void on(String event, MessageSocket message) { | ||
36 | + throw 'To use sockets you need dart:io or dart:html'; | ||
37 | + } | ||
38 | + | ||
13 | void close([int status, String reason]) { | 39 | void close([int status, String reason]) { |
14 | throw 'To use sockets you need dart:io or dart:html'; | 40 | throw 'To use sockets you need dart:io or dart:html'; |
15 | } | 41 | } |
42 | + | ||
43 | + void send(dynamic data) async { | ||
44 | + throw 'To use sockets you need dart:io or dart:html'; | ||
45 | + } | ||
46 | + | ||
47 | + void dispose() { | ||
48 | + throw 'To use sockets you need dart:io or dart:html'; | ||
49 | + } | ||
50 | + | ||
51 | + void emit(String event, dynamic data) { | ||
52 | + throw 'To use sockets you need dart:io or dart:html'; | ||
53 | + } | ||
54 | + | ||
16 | } | 55 | } |
-
Please register or login to post a comment