sile / Rusturn
Licence: mit
A Rust Implementation of TURN server and client
Stars: ✭ 54
Programming Languages
rust
11053 projects
Labels
Projects that are alternatives of or similar to Rusturn
Python Adguardhome
Asynchronous Python client for the AdGuard Home API
Stars: ✭ 29 (-46.3%)
Mutual labels: asynchronous
Partial.lenses.validation
Partial Lenses Validation is a JavaScript library for validating and transforming data
Stars: ✭ 39 (-27.78%)
Mutual labels: asynchronous
Queuer
Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD).
Stars: ✭ 964 (+1685.19%)
Mutual labels: asynchronous
Dkregistry Rs
A pure-Rust asynchronous library for Docker Registry API v2
Stars: ✭ 35 (-35.19%)
Mutual labels: asynchronous
Async Deeprl
Playing Atari games with TensorFlow implementation of Asynchronous Deep Q-Learning
Stars: ✭ 44 (-18.52%)
Mutual labels: asynchronous
Tk Listen
A library that allows to listen network sockets with proper resource limits and error handling
Stars: ✭ 27 (-50%)
Mutual labels: asynchronous
Handle Path Oz
Android Library to handle multiple Uri's(paths) received through Intents.
Stars: ✭ 36 (-33.33%)
Mutual labels: asynchronous
Halive
A fast http and https prober, to check which URLs are alive
Stars: ✭ 47 (-12.96%)
Mutual labels: asynchronous
Csp
Communicating Sequential Processes in JavaScript
Stars: ✭ 33 (-38.89%)
Mutual labels: asynchronous
Jdonframework
Domain-Driven-Design Pub/Sub Domain-Events framework
Stars: ✭ 978 (+1711.11%)
Mutual labels: asynchronous
Tackle
💯 percent reliable microservice communication
Stars: ✭ 44 (-18.52%)
Mutual labels: asynchronous
Tokio File Unix
Asynchronous support for epollable files via Tokio on Unix-like platforms
Stars: ✭ 29 (-46.3%)
Mutual labels: asynchronous
Before After Hook
wrap methods with before/after hooks
Stars: ✭ 49 (-9.26%)
Mutual labels: asynchronous
Franticapparatus
Type and memory safe promises for Swift, supports cancellation
Stars: ✭ 27 (-50%)
Mutual labels: asynchronous
Mecks unit
A simple Elixir package to elegantly mock module functions within (asynchronous) ExUnit tests using Erlang's :meck library
Stars: ✭ 43 (-20.37%)
Mutual labels: asynchronous
Scala Async
An asynchronous programming facility for Scala
Stars: ✭ 1,077 (+1894.44%)
Mutual labels: asynchronous
React Async Fetcher
React component for asynchronous loading/fetch online data
Stars: ✭ 50 (-7.41%)
Mutual labels: asynchronous
Ios Nd Gcd
Resources for Udacity's Grand Central Dispatch course.
Stars: ✭ 46 (-14.81%)
Mutual labels: asynchronous
rusturn
A Rust implementation of TURN server and client.
Examples
use futures::Future;
use rustun::message::Request;
use rustun::transport::StunUdpTransporter;
use rusturn::auth::AuthParams;
use rusturn::transport::UdpOverTurnTransporter;
use stun_codec::{rfc5389, MessageDecoder, MessageEncoder};
let client_auth_params = AuthParams::new("foo", "bar")?;
let server_auth_params =
AuthParams::with_realm_and_nonce("foo", "bar", "baz", "qux")?;
// STUN server (peer)
let stun_server = fibers_global::execute(rustun::server::UdpServer::start(
fibers_global::handle(),
"127.0.0.1:0".parse().unwrap(),
rustun::server::BindingHandler,
))?;
let stun_server_addr = stun_server.local_addr();
fibers_global::spawn(stun_server.map(|_| ()).map_err(|e| panic!("{}", e)));
// TURN server
let turn_server = fibers_global::execute(rusturn::server::UdpServer::start(
"127.0.0.1:0".parse().unwrap(),
server_auth_params,
))?;
let turn_server_addr = turn_server.local_addr();
fibers_global::spawn(turn_server.map_err(|e| panic!("{}", e)));
// TURN client
let turn_client = fibers_global::execute(rusturn::client::UdpClient::allocate(
turn_server_addr,
client_auth_params
))?;
let transporter =
UdpOverTurnTransporter::<_, MessageEncoder<_>, MessageDecoder<_>>::new(turn_client);
// STUN client (over TURN)
let stun_channel = rustun::channel::Channel::new(StunUdpTransporter::new(transporter));
let stun_client = rustun::client::Client::new(&fibers_global::handle(), stun_channel);
// BINDING request
let request = Request::<rfc5389::Attribute>::new(rfc5389::methods::BINDING);
let response = fibers_global::execute(
stun_client.call(stun_server_addr, request)
)?;
assert!(response.is_ok(), "{:?}", response);
References
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].