dnet 0.1.3

Message passing infrastructure.
Documentation

dnet

Test Status Crate API

dnet is a unified messaging abstraction library for Rust that allows sending and receiving messages over a variety of transport protocols with a consistent, easy-to-use async interface.

https://crates.io/crates/dnet

Usage

See examples.

Supported Transports

Transport Native Browser Description
TCP ✅ n/a Transport over Tokio TCP implementation.
UDP ✅ n/a Transport over Tokio UDP implementation.
QUIC ✅ n/a Transport over Quinn QUIC implementation.
MessagePort n/a ✅ Transport over MessagePort.
Web Worker n/a ✅ Communication with Web Workers.
WebSocket ✅ ✅ Transport over WebSockets.
Channel ✅ ✅ Transport over futures channels.
WebRTC data channel* ✅ ✅ Transport over WebRTC data channels.

Additionally any transport implementing Tokio's AsyncRead and AsyncWrite traits is also supported.

*available for licensing, not available in the free version of the library - see WebRTC section.

WebRTC Support

The dnet-webrtc crate provides robust WebRTC transport capabilities:

  • Transport over WebRTC data channels,
  • WebRTC signaling is handled automatically, both client and server-side - you simply decide which peers to connect together, the rest is done for you,
  • Server and client-side connection management - handle signaling of multiple connections over a single shared transport to signaling server,
  • Manual (custom) signaling is still an option, with minimal code changes, when needed,
  • Automatic ICE candidate negotiation,
  • Support for both browser and native environments.

Licensing

The dnet-webrtc crate is available under a commercial license. The commercial version includes:

  • Full source code access,
  • Technical support,
  • Production deployment assistance,
  • Regular updates and maintenance,
  • Pong clone peer-to-peer game example,
  • Example demonstrating client-server architecture using WebRTC data channels to connect multiple client peers to a single host.

For licensing inquiries and pricing, please contact: dzduniak@gmail.com

License

This project is licensed under the MIT License.