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

Method onack

packages/socket.io/lib/socket.ts:607–616  ·  view source on GitHub ↗

* Called upon ack packet. * * @private

(packet: Packet)

Source from the content-addressed store, hash-verified

605 * @private
606 */
607 private onack(packet: Packet): void {
608 const ack = this.acks.get(packet.id!);
609 if ("function" == typeof ack) {
610 debug("calling ack %s with %j", packet.id, packet.data);
611 ack.apply(this, packet.data);
612 this.acks.delete(packet.id!);
613 } else {
614 debug("bad ack %s", packet.id);
615 }
616 }
617
618 /**
619 * Called upon client disconnect packet.

Callers 1

_onpacketMethod · 0.95

Calls 2

debugFunction · 0.85
applyMethod · 0.80

Tested by

no test coverage detected