mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-28 09:10:09 +00:00
Rename buffer
field to pastData
This commit is contained in:
parent
8c8eb20ad6
commit
c176f4c737
@ -21,7 +21,7 @@ type tcpReader struct {
|
||||
isClient bool
|
||||
isOutgoing bool
|
||||
msgQueue chan api.TcpReaderDataMsg // Channel of captured reassembled tcp payload
|
||||
buffer []byte
|
||||
pastData []byte
|
||||
data []byte
|
||||
progress *api.ReadProgress
|
||||
captureTime time.Time
|
||||
@ -83,7 +83,7 @@ func (reader *tcpReader) isProtocolIdentified() bool {
|
||||
}
|
||||
|
||||
func (reader *tcpReader) rewind() {
|
||||
reader.data = reader.buffer
|
||||
reader.data = reader.pastData
|
||||
}
|
||||
|
||||
func (reader *tcpReader) Read(p []byte) (int, error) {
|
||||
@ -96,7 +96,7 @@ func (reader *tcpReader) Read(p []byte) (int, error) {
|
||||
reader.data = msg.GetBytes()
|
||||
reader.captureTime = msg.GetTimestamp()
|
||||
if !reader.isProtocolIdentified() {
|
||||
reader.buffer = append(reader.buffer, reader.data...)
|
||||
reader.pastData = append(reader.pastData, reader.data...)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,8 @@ func (t *tcpStream) addReqResMatcher(reqResMatcher api.RequestResponseMatcher) {
|
||||
|
||||
func (t *tcpStream) SetProtocol(protocol *api.Protocol) {
|
||||
t.protocol = protocol
|
||||
t.client.buffer = []byte{}
|
||||
t.server.buffer = []byte{}
|
||||
t.client.pastData = []byte{}
|
||||
t.server.pastData = []byte{}
|
||||
}
|
||||
|
||||
func (t *tcpStream) GetOrigin() api.Capture {
|
||||
|
Loading…
Reference in New Issue
Block a user