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.
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.