count
times, and finally continue playback to the end of the clip. If the current position when this method is invoked is greater than the loop end point, playback simply continues to the end of the clip without looping.
A count
value of 0 indicates that any current looping should cease and playback should continue to the end of the clip. The behavior is undefined when this method is invoked with any other value during a loop operation.
If playback is stopped during looping, the current loop status is cleared; the behavior of subsequent loop and start requests is not affected by an interrupted loop operation.
@param count the number of times playback should loop back from theloop's end position to the loop's start position, or {@link #LOOP_CONTINUOUSLY}
to indicate that looping should continue until interrupted
int pcap_loop(pcap_t *, int, pcap_handler, u_char *)
. When a packet is captured, listener.gotPacket(Packet)
is called in the thread which called the loop()
. And then this PcapHandle waits for the thread to return from the gotPacket()
before it retrieves the next packet from the pcap capture buffer.
@param packetCount
@param listener
@throws PcapNativeException
@throws InterruptedException
@throws NotOpenException
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|