MCPcopy
hub / github.com/srcbookdev/srcbook / subscribe

Method subscribe

packages/web/src/clients/websocket/channel.ts:77–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76
77 subscribe() {
78 if (this.subscribed) {
79 return;
80 }
81
82 this.subscriptionId = randomid();
83 this.client.push(this.topic, 'subscribe', { id: this.subscriptionId });
84 this.client.on(this.topic, this.receive);
85 }
86
87 unsubscribe() {
88 this.subscribed = false;

Callers 1

SessionPageFunction · 0.80

Calls 2

pushMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected