Skip to content

Commit

Permalink
Add new event based api to icmp and igmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaxxz committed Mar 25, 2015
1 parent 2fb883f commit 6af6a51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions decode/icmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ICMP.prototype.decode = function (raw_packet, offset) {
this.code = raw_packet[offset++];
this.checksum = raw_packet.readUInt16BE(offset); // 2, 3

if(this.emitter) { this.emitter.emit("icmp", this); }
return this;
};

Expand Down
1 change: 1 addition & 0 deletions decode/igmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ IGMP.prototype.decode = function (raw_packet, offset) {
break;
}

if(this.emitter) { this.emitter.emit("igmp", this); }
return this;
};

Expand Down

0 comments on commit 6af6a51

Please sign in to comment.