Struct secret_stream::Server [] [src]

pub struct Server<'a, S>(_);

A future that accepts a secret-handshake and then yields a channel that encrypts/decrypts all data via box-stream.

Methods

impl<'a, S: AsyncRead + AsyncWrite> Server<'a, S>
[src]

[src]

Create a new Server to accept a connection from a client which knows the server's public key and uses the right app key over the given stream.

Ephemeral keypairs can be generated via sodiumoxide::crypto::box_::gen_keypair.

Trait Implementations

impl<'a, S: AsyncRead + AsyncWrite> Future for Server<'a, S>
[src]

On success, the result contains the encrypted connection and the longterm public key of the client.

An error

[src]

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations

impl<'a, S> !Send for Server<'a, S>

impl<'a, S> !Sync for Server<'a, S>