- Type Parameters:
U
- the generic user type
- All Superinterfaces:
PcapHandler
- Enclosing interface:
PcapHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An advanced low level, no copy, packet handler. The packets dispatched using
this handler are no copied and memory segments reference into native pcap
ring-buffer and are only safe to use during the duration of handler call.
After the handler returns that packet memory is no longer valid and may throw
an exception if tried to access.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jnetpcap.PcapHandler
PcapHandler.NativeCallback, PcapHandler.OfArray<U>, PcapHandler.OfByteBuffer<U>, PcapHandler.OfMemorySegment<U>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleSegment
(U user, MemorySegment header, MemorySegment Packet) Packet handler method.
-
Method Details
-
handleSegment
Packet handler method. This method get called to handle or consume a pcap packet.- Parameters:
user
- the userheader
- the headerPacket
- the packet
-