style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

What is the purpose of the "user" field in the nextPacket() method?

1 reply [Last post]
Bill Evans
Offline
Joined: 09/11/2015

What is the intention of the 'user' field in:

public void nextPacket(PcapPacket packet, T user);

Thanks in advance for your help. Great product.

Mark Bednarczyk
Offline
Joined: 03/22/2008
Lets you pass in any type of

Lets you pass in any type of object that is helpful to your handler. A good usage for it is to pass some kind of 'state' object. So if you use the same handler with multiple PCAP interfaces, each one can keep different state and you do not have to perform any kind of lookup (per interface) to get at a state object.

Sly Technologies, Inc.
http://slytechs.com

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.