node-pcap / node_pcap

libpcap bindings for node
MIT License
928 stars 253 forks source link

Event when finished parsing pcap file (offline session)? #284

Closed stodge closed 3 years ago

stodge commented 3 years ago

I'm loading and decoding a local PCAP file using pcap.createOfflineSession(). I need to know when the module is done parsing the PCAP file, but I don't see any evidence of an "end" event. Is there such a thing? Thanks

stodge commented 3 years ago

My mistake, I found the "complete" event in the source:

pcap_session.on("complete", () => {
    console.log("DONE")
})