src/org/jnetpcap/PcapUtils.java
public static <T> PcapTask<T> loopInBackground(
	    Pcap pcap,
	    int cnt,
	    final JBufferHandler<T> handler,
	    final T data) {
		return new PcapTask<T>(pcap, cnt, data) {

			public void run() {
				this.result = pcap.loop(count, handler, data);
			}

		};
	}
/**
	 * Runs the loop function in a background thread. The function returns
	 * immediately and returns a PcapTask from which the user can interact with
	 * the background task.
	 * 
	 * @param <T>
	 *          user supplied type
	 * @param pcap
	 *          an open pcap object
	 * @param cnt
	 *          number of packets to capture and exit, 0 for infinate
	 * @param handler
	 *          user supplied callback handler
	 * @param data
	 *          opaque, user supplied data object dispatched back to the handler
	 * @return a task object which allows interaction with the underlying capture
	 *         loop and thread
	 */
Runs the loop function in a background thread. The function returns
immediately and returns a PcapTask from which the user can interact with
the background task.


Runs the loop function in a background thread . The function returns immediately and returns a PcapTask from which the user can interact with the background task .
public static <T> PcapTask<T> loopInBackground(
	    Pcap pcap,
	    int cnt,
	    final JBufferHandler<T> handler,
	    final T data) {
		return new PcapTask<T>(pcap, cnt, data) {
			public void run() {
				this.result = pcap.loop(count, handler, data);
			}
		};
	}
public static < T > PcapTask < T > loopInBackground ( Pcap pcap , int cnt , final JBufferHandler < T > handler , final T data ) { return new PcapTask < T > ( pcap , cnt , data ) { public void run ( ) { this . result = pcap . loop ( count , handler , data ) ; } } ; }
Runs the loop function in a background thread.
Runs the loop function in a background thread .