-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathWebSocket.js
More file actions
65 lines (56 loc) · 1020 Bytes
/
WebSocket.js
File metadata and controls
65 lines (56 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
export function create(url) {
return function (protocols) {
return function () {
return new WebSocket(url, protocols);
};
};
}
export function url(ws) {
return function () {
return ws.url;
};
}
export function readyStateImpl(ws) {
return function () {
return ws.readyState;
};
}
export function bufferedAmount(ws) {
return function () {
return ws.bufferedAmount;
};
}
export function extensions(ws) {
return function () {
return ws.extensions;
};
}
export function protocol(ws) {
return function () {
return ws.protocol;
};
}
export function close(ws) {
return function () {
return ws.close();
};
}
export function getBinaryTypeImpl(ws) {
return function () {
return ws.binaryType;
};
}
export function setBinaryTypeImpl(ws) {
return function (bt) {
return function () {
ws.binaryType = bt;
};
};
}
export function sendImpl(ws) {
return function (value) {
return function () {
ws.send(value);
};
};
}