View Source ExShark.AsyncCapture (exshark v0.1.0)

Handles asynchronous packet processing with callbacks.

Summary

Functions

Applies a callback function to each packet in a capture file.

Similar to apply_on_packets/3 but handles async callbacks. Returns a list of processed results.

Starts a live asynchronous capture with a callback function.

Returns a specification to start this module under a supervisor.

Stops all ongoing async captures.

Functions

apply_on_packets(file_path, callback, opts \\ [])

Applies a callback function to each packet in a capture file.

apply_on_packets_async(file_path, callback, opts \\ [])

Similar to apply_on_packets/3 but handles async callbacks. Returns a list of processed results.

capture_live(callback, opts \\ [])

Starts a live asynchronous capture with a callback function.

child_spec(arg)

Returns a specification to start this module under a supervisor.

arg is passed as the argument to Task.start_link/1 in the :start field of the spec.

For more information, see the Supervisor module, the Supervisor.child_spec/2 function and the Supervisor.child_spec/0 type.

stop_all()

Stops all ongoing async captures.