A library for easily creating WebRTC data channel connections in Rust

Overview

Cyberdeck

A library for easily creating WebRTC data channel connections in Rust.

let mut cd = Cyberdeck::new(|c, msg| {
    if let Some(m) = msg {
        println!("Recieved a message from channel {}!", c.name());
        let msg_str = String::from_utf8(m.data.to_vec()).unwrap();
        println!("Message from DataChannel '{}': {}", c.name(), msg_str);
    } else if c.state() == RTCDataChannelState::Open {
        println!("DataChannel '{}' opened", c.name());
        c.send_text("Connected to client!").unwrap();
    } else if c.state() == RTCDataChannelState::Closed {
        println!("DataChannel '{}' closed", c.name());
    }
})
.await?;
let answer = cd.set_offer(offer).await?;

You can try out this code by going to https://jsfiddle.net/ndgvLuyc/

  1. Copy the code from "Browser base64 Session Description"
  2. Open up a terminal and type in echo | cargo run --example simple
  3. Copy the response code in the terminal, and past it into "Rust base64 Session Description"
  4. Hit connect and send messages
Owner
RICHΛRD ΛNΛYΛ
Data Engineer, Code Philosopher, & Robot Psychologist.
RICHΛRD ΛNΛYΛ
A pure Rust implementation of WebRTC API

A pure Rust implementation of WebRTC API

WebRTC.rs 1.5k Nov 28, 2021
Painless peer-to-peer WebRTC networking for rust wasm

Matchbox Painless peer-to-peer WebRTC networking for rust wasm applications. The goal of the Matchbox project is to enable udp-like, unordered, unreli

Johan Klokkhammer Helsing 179 Nov 14, 2021
A multiplayer web based roguelike built on Rust and WebRTC

Gorgon A multiplayer web-based roguelike build on Rust and WebRTC. License This project is licensed under either of Apache License, Version 2.0, (LICE

RICHΛRD ΛNΛYΛ 1 Oct 18, 2021
All-batteries included GStreamer WebRTC producer

webrtcsink All-batteries included GStreamer WebRTC producer, that tries its best to do The Right Thing™. Use case The webrtcbin element in GStreamer i

Centricular 2 Nov 24, 2021
Easily share data between terminal windows!

abra A tool that makes data sharing between terminal windows easy. abra can be used for displaying info about the current working directory, for split

Denis Isidoro 21 Aug 25, 2021
Safe Rust crate for creating socket servers and clients with ease.

bitsock Safe Rust crate for creating socket servers and clients with ease. Description This crate can be used for Client <--> Server applications of e

Lorenzo Torres 2 Nov 24, 2021
Shotover: L7 data-layer proxy

Shotover: L7 data-layer proxy

null 19 Nov 24, 2021
A tcp proxy server/client which exchange the data in temp files

ftcp A tcp proxy server/client which exchange the data in temp files 通过在临时文件中交换数据来进行TCP代理的一个服务端/客户端 学校内网中有针对教学楼的防火墙导致教室电脑难以上网( 但学校内建有公共ftp服务器,因此就有了这个借

Daile Liu 1 Nov 20, 2021
The gRPC library for Rust built on C Core library and futures

gRPC-rs gRPC-rs is a Rust wrapper of gRPC Core. gRPC is a high performance, open source universal RPC framework that puts mobile and HTTP/2 first. Sta

TiKV Project 1.4k Nov 29, 2021
A µTP (Micro/uTorrent Transport Library) library implemented in Rust

rust-utp A Micro Transport Protocol library implemented in Rust. API documentation Overview The Micro Transport Protocol is a reliable transport proto

Ricardo Martins 121 Aug 15, 2021
A library to work with CIDRs in rust

ipnetwork This is a library to work with IPv4 and IPv6 CIDRs in Rust Run Clippy by doing rustup component add clippy cargo clippy Installation This c

Abhishek Chanda 73 Nov 27, 2021
Nanomsg library for Rust

Nanomsg Documentation Nanomsg is a modern messaging library that is the successor to ZeroMQ, written in C by Martin Sustrik and colleagues. The nanoms

Daniel Fagnan 361 Nov 10, 2021
A Constrained Application Protocol(CoAP) library implemented in Rust.

coap-rs A fast and stable Constrained Application Protocol(CoAP) library implemented in Rust. Features: CoAP core protocol RFC 7252 CoAP Observe optio

Covertness 147 Nov 18, 2021
Backroll is a pure Rust implementation of GGPO rollback networking library.

backroll-rs Backroll is a pure Rust implementation of GGPO rollback networking library. Development Status This is still in an untested alpha stage. A

Hourai Teahouse 138 Nov 22, 2021
A Rust library for parsing the SOME/IP network protocol (without payload interpretation).

someip_parse A Rust library for parsing the SOME/IP network protocol (without payload interpretation). Usage Add the following to your Cargo.toml: [de

Julian Schmid 11 Oct 12, 2021
Modrinth API is a simple library for using Modrinth's API in Rust projects

Ferinth is a simple library for using the Modrinth API in Rust projects. It uses reqwest as its HTTP(S) client and deserialises responses to typed structs using serde.

null 1 Nov 25, 2021
An LV2 host library for Rust.

Livi A library for hosting LV2 plugins. Note: This is a work in progress and has not yet been full tested. Supported LV2 Features LV2 has a simple cor

Will 2 Nov 21, 2021
A simple message based networking library for the bevy framework

Spicy Networking for Bevy bevy_spicy_networking is a solution to the "How do I connect multiple clients to a single server" problem in your bevy games

Cabbit Studios 40 Nov 22, 2021
Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.

TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests Similar to the network tab in Google Chrome or Mozilla Firefox, this crate helps you find the

Philipp Schuster 16 Nov 13, 2021