david415 / HoneyBadger

Quantum Insert detector/recorder
GNU General Public License v3.0
305 stars 39 forks source link

timeout olde connections after duration of zero activity #17

Closed david415 closed 9 years ago

david415 commented 9 years ago

timeout olde connections after duration of zero activity...

gopacket.tcpassembly has some good design we can learn from. In particular it seems a worthwhile goal to decouple TCP stream processing from the reading of packets off the wire. gopacket.tcpassembly does this by processing the packet along with a timestamp of when it was received...

Therefore... if we read packets off the wire we generate the timestamp (time.Now()) and if we are processing a pcap file then we get the timestamp from the file.

david415 commented 9 years ago

https://github.com/david415/HoneyBadger/commit/7dc528bdd6d66ed81a147b803707789d16ad864e