Documentation
¶
Rendered for js/wasm
Overview ¶
Package capture bridges the util/capture package to JavaScript via syscall/js.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
Start creates a capture session and returns a JS interface for streaming text output. The returned object exposes:
onpacket(callback) - set callback(string) for each text line
stop() - stop capture and return stats { packets, bytes, dropped }
Options: { filter: string, verbose: bool, ascii: bool } or just a filter string.
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle holds a running capture session so it can be stopped later.
func StartConsole ¶
StartConsole starts a capture that logs every packet line to console.log. Returns a Handle so the caller can stop it later.
func (*Handle) Stop ¶
func (h *Handle) Stop() netbird.CaptureStats
Stop ends the capture and returns stats.
Click to show internal directories.
Click to hide internal directories.