MCPcopy
hub / github.com/socketio/socket.io / doWrite

Method doWrite

packages/engine.io-client/lib/transports/polling-fetch.ts:27–39  ·  view source on GitHub ↗
(data: string, callback: () => void)

Source from the content-addressed store, hash-verified

25 }
26
27 override doWrite(data: string, callback: () => void) {
28 this._fetch(data)
29 .then((res) => {
30 if (!res.ok) {
31 return this.onError("fetch write error", res.status, res);
32 }
33
34 callback();
35 })
36 .catch((err) => {
37 this.onError("fetch write error", err);
38 });
39 }
40
41 private _fetch(data?: string) {
42 const isPost = data !== undefined;

Callers

nothing calls this directly

Calls 3

_fetchMethod · 0.95
callbackFunction · 0.70
onErrorMethod · 0.45

Tested by

no test coverage detected