Expand description
Cross-platform socket inspection for TCP and UDP.
netsock provides iterators and collection APIs for enumerating sockets on
Linux, macOS, Windows, and FreeBSD.
Modules§
Structs§
- Process
Cache - Snapshot of process-to-socket inode mappings on Linux.
Functions§
- get_
sockets - Collects sockets that match the requested address families and protocols.
Collects sockets into a
Vecusing the provided filters. - iter_
sockets - Returns an iterator over sockets that match the requested filters. Returns sockets with process ownership attached.
- iter_
sockets_ with_ cache - Returns sockets using a caller-provided process cache. Returns sockets with process ownership attached using a prebuilt cache.
- iter_
sockets_ without_ processes - Returns sockets without process ownership data.