Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Transports

dnet provides a variety of transport implementations for different networking scenarios.

Transports are implemented for both native and WebAssembly targets (when appropriate).

Provided transports

Available for licensing

Logging

The “logging” feature is not enabled by default. If you want transport-level diagnostics, enable it in your Cargo.toml:

[dependencies]
dnet = { version = "0.1.4", features = ["logging"] }

When the “logging” feature is enabled, supported transports implement the Logging trait. You can then enable logging at runtime and assign a logical transport name for easier filtering and debugging:

use dnet::Logging;

let mut transport = /* create transport */;
transport.set_logging_name("peer-1");
transport.enable_logging();

Named transports are especially useful when you use multiple transports of the same kind in your application.