Crate tetsy_libp2p_wasm_ext[][src]

Implementation of the tetsy-libp2p Transport trait for external transports.

This Transport is used in the context of WASM to allow delegating the transport mechanism to the code that uses rust-libp2p, as opposed to inside of rust-tetsy-libp2p itself.

Note: This only allows transports that produce a raw stream with the remote. You couldn’t, for example, pass an implementation QUIC.

Usage

Call new() with a JavaScript object that implements the interface described in the ffi module.

Modules

ffi

Contains the definition that one must match on the JavaScript side.

Structs

Connection

Active stream of data with a remote.

Dial

Future that dial a remote through an external transport.

ExtTransport

Implementation of Transport whose implementation is handled by some FFI.

JsErr

Error that can be generated by the ExtTransport.

Listen

Stream that listens for incoming connections through an external transport.