(nread, handle, buf, rinfo)
| 1096 | |
| 1097 | |
| 1098 | function 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 | |
| 1112 | function onError(nread, handle, error) { |