zero copy capture

delay copying until necessary
This commit is contained in:
Matthias Radestock committed 2014-08-20 16:08:43 +01:00
1 parent 276e3b8487
commit 1a41df1edf
2 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ func newPcapIO(ifName string, promisc bool, snaplen int, bufSz int) (handle *Pca
}
func (pi *PcapIO) ReadPacket() (data []byte, err error) {
data, _, err = pi.handle.ReadPacketData()
data, _, err = pi.handle.ZeroCopyReadPacketData()
return
}