MCPcopy Index your code
hub / github.com/nodejs/node / onMessage

Function onMessage

lib/dgram.js:1098–1109  ·  view source on GitHub ↗
(nread, handle, buf, rinfo)

Source from the content-addressed store, hash-verified

1096
1097
1098function onMessage(nread, handle, buf, rinfo) {
1099 const self = handle[owner_symbol];
1100 if (nread < 0) {
1101 return self.emit('error', new ErrnoException(nread, 'recvmsg'));
1102 }
1103 if (self[kStateSymbol]?.receiveBlockList?.check(rinfo.address,
1104 rinfo.family?.toLocaleLowerCase())) {
1105 return;
1106 }
1107 rinfo.size = buf.length; // compatibility
1108 self.emit('message', buf, rinfo);
1109}
1110
1111
1112function onError(nread, handle, error) {

Callers 1

publishMethod · 0.70

Calls 2

emitMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected