Packet Sniffer SDK VCL Edition

HNFileAdapter :: Properties :: Queue

 Previous Next

Sets/Returns the handle of HNQueue object.

Syntax:

property Queue: Pointer;

Description:

Use Queue to set queue for packets processing by HNFileAdapter object in AutoMode.

If Queue property was set to not-NULL before CAP file is created/opened, and AutoMode was set (see HNFileAdapter.AutoMode), then traffic will be processed with HNQueue component.

For data reading/writing in AutoMode please use HNFileAdapter.OpenFile/HNFileAdapter.CreateFile functions respectively.

HNFileAdapter.Queue property can be changed only when HNFileAdapter component is closed (see HNFileAdapter.IsOpened).

To set packets queue for the network adapter, please do the following:

...
HNQueue1.MaxPacketSize := 1514;
HNQueue1.ItemsCount := 50000;
HNQueue1.AllocItems();
HNQueue1.Start();

HNFileAdapter1.AutoMode := TRUE;
HNFileAdapter1.Queue := HNQueue1.Handle;
HNFileAdapter1.OpenFile("packets.cap");
...
HNQueue1.Stop();
HNQueue1.FreeItems();
See also:HNFileAdapter, HNQueue, HNFileAdapter.AutoMode, HNFileAdapter.OpenFile, HNFileAdapter.CreateFile, HNFileAdapter.IsOpened