MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / ZeroWebsocket

Function ZeroWebsocket

src/Ui/media/all.js:56–68  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

54
55 ZeroWebsocket = (function() {
56 function ZeroWebsocket(url) {
57 this.onCloseWebsocket = bind(this.onCloseWebsocket, this);
58 this.onErrorWebsocket = bind(this.onErrorWebsocket, this);
59 this.onOpenWebsocket = bind(this.onOpenWebsocket, this);
60 this.log = bind(this.log, this);
61 this.response = bind(this.response, this);
62 this.route = bind(this.route, this);
63 this.onMessage = bind(this.onMessage, this);
64 this.url = url;
65 this.next_message_id = 1;
66 this.waiting_cb = {};
67 this.init();
68 }
69
70 ZeroWebsocket.prototype.init = function() {
71 return this;

Callers

nothing calls this directly

Calls 2

initMethod · 0.80
bindFunction · 0.70

Tested by

no test coverage detected