Skip to content

Instantly share code, notes, and snippets.

@jeanqasaur
Last active May 4, 2021 04:37
Show Gist options
  • Save jeanqasaur/53c5930b285f3b1670c25e16dc836929 to your computer and use it in GitHub Desktop.
Save jeanqasaur/53c5930b285f3b1670c25e16dc836929 to your computer and use it in GitHub Desktop.
Function for creating new tcpStream struct
func newTCPStream(clock clockWrapper, netFlow gopacket.Flow,
outChan chan<- akinet.ParsedNetworkTraffic,
fs akinet.TCPParserFactorySelector) *tcpStream {
return &tcpStream{
clock: clock,
bidiID: akinet.TCPBidiID(uuid.New()),
netFlow: netFlow,
factorySelector: fs,
outChan: outChan,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment