MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / once

Method once

app/public/socketcluster-client.js:6276–6283  ·  view source on GitHub ↗
(timeout)

Source from the content-addressed store, hash-verified

6274 }
6275
6276 async once(timeout) {
6277 let result = await this.next(timeout);
6278 if (result.done) {
6279 // If stream was ended, this function should never resolve.
6280 await new Promise(() => {});
6281 }
6282 return result.value;
6283 }
6284
6285 createConsumer() {
6286 throw new TypeError('Method must be overriden by subclass');

Callers

nothing calls this directly

Calls 1

nextMethod · 0.95

Tested by

no test coverage detected