docs.rs failed to build rustun-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
rustun-0.5.0
rustun
A Rust library for implementing STUN server and client asynchronously.
The STUN protocol is defined in RFC 5389.
Examples
An example that issues a BINDING
request:
use UdpTransporter;
use Future;
use Channel;
use Client;
use Request;
use ;
use StunUdpTransporter;
use Error;
use ;
let addr = "127.0.0.1:0".parse.unwrap;
// Starts UDP server
let server = execute?;
let server_addr = server.local_addr;
spawn;
// Sents BINDING request
let response = bind
.map_err
.map
.map
.and_then;
// Waits BINDING response
let response = execute?;
assert!;
You can run example server and client which handle Binding
method as follows:
// Starts the STUN server in a shell.
$ cargo run --example binding_srv
// Executes a STUN client in another shell.
$ cargo run --example binding_cli -- 127.0.0.1
Ok(SuccessResponse(Message {
class: SuccessResponse,
method: Method(1),
transaction_id: TransactionId(0x344A403694972F5E53B69465),
attributes: [Known { inner: XorMappedAddress(XorMappedAddress(V4(127.0.0.1:54754))),
padding: Some(Padding([])) }]
}))