diff options
Diffstat (limited to 'stream_factory.go')
-rw-r--r-- | stream_factory.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/stream_factory.go b/stream_factory.go deleted file mode 100644 index e1d76a4..0000000 --- a/stream_factory.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "github.com/google/gopacket" - "github.com/google/gopacket/tcpassembly" -) - -type BiDirectionalStreamFactory struct { - storage *Storage - serverIp string -} - -// httpStream will handle the actual decoding of http requests. -type uniDirectionalStream struct { - net, transport gopacket.Flow - r StreamHandler -} - -func (h *BiDirectionalStreamFactory) New(net, transport gopacket.Flow) tcpassembly.Stream { - hstream := &uniDirectionalStream{ - net: net, - transport: transport, - r: NewStreamHandler(), - } - // go hstream.run() // Important... we must guarantee that data from the tcpreader stream is read. - - // StreamHandler implements tcpassembly.Stream, so we can return a pointer to it. - return &hstream.r -} |