mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-26 15:59:24 -05:00
placeholder for network shim
This commit is contained in:
parent
fd53ef5509
commit
0495afb3c6
@ -46,6 +46,7 @@ pub mod mutable_future;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub mod network_interfaces;
|
||||
pub mod network_result;
|
||||
pub mod network_shim;
|
||||
pub mod random;
|
||||
pub mod single_shot_eventual;
|
||||
pub mod sleep;
|
||||
|
50
veilid-tools/src/network_shim/mod.rs
Normal file
50
veilid-tools/src/network_shim/mod.rs
Normal file
@ -0,0 +1,50 @@
|
||||
//! # Network Shim
|
||||
//!
|
||||
//! ## Networking abstraction layer
|
||||
//!
|
||||
//! Support for mocking and virtualizing network connections, as well as passing through to supported
|
||||
//! networking functionality.
|
||||
//!
|
||||
//! The following structs are available that allow connecting to a centralized virtual
|
||||
//! router to emulate a large scale network.
|
||||
//!
|
||||
//! * RouterClient
|
||||
//! * RouterServer
|
||||
//!
|
||||
//! Additional traits are is implemented for all shimmed APIs that have static methods
|
||||
//! like `new()`, `default()`, `connect()` and `bind()` to allow optional namespacing
|
||||
//! such that the structs they produce are new network router clients with their own
|
||||
//! distinct IP addresses, network segments, and network characteristics as allocated
|
||||
//! by the [RouterServer].
|
||||
//!
|
||||
//! A singleton RouterClient is created by this module that is used by default unless the
|
||||
//! extension traits on the shimmed APIs are used to override it with another RouterClient instance.
|
||||
//!
|
||||
//! ## Available shims
|
||||
//!
|
||||
//! API-compatible shims for:
|
||||
//! * Tokio (Native)
|
||||
//! - [tokio::net::TcpListener]
|
||||
//! - [tokio::net::TcpStream]
|
||||
//! - [tokio::net::UdpSocket]
|
||||
//! - [tokio_stream::wrappers::TcpListenerStream]
|
||||
//! * Async-std (Native)
|
||||
//! - [async_std::net::TcpListener]
|
||||
//! - [async_std::net::TcpStream]
|
||||
//! - [async_std::net::UdpSocket]
|
||||
//! - [async_std::net::Incoming]
|
||||
//! * std::net (Native)
|
||||
//! - [std::net::TcpListener]
|
||||
//! - [std::net::TcpStream]
|
||||
//! - [std::net::UdpSocket]
|
||||
//! - [std::net::Incoming]
|
||||
//! * ws_stream_wasm (browser WASM)
|
||||
//! - [ws_stream_wasm::WsMeta]
|
||||
//! - [ws_stream_wasm::WsStream]
|
||||
//! - [ws_stream_wasm::WsStreamIo]
|
||||
//!
|
||||
//! ## Other modules leveraging this module
|
||||
//!
|
||||
//! * `veilid-core`'s network `native` and `wasm` modules
|
||||
//! * This crate's `network_interfaces` module
|
||||
//! * This crate's `dns_lookup` module
|
Loading…
Reference in New Issue
Block a user