[][src]Trait runng::asyncio::AsyncSocket

pub trait AsyncSocket: Socket {
    type ContextType: AsyncContext;
    fn create_async(&self) -> NngResult<Self::ContextType> { ... }
}

A Socket that can be turned into a context for asynchronous I/O.

Examples

use runng::{
    *,
    asyncio::*,
};
fn test() -> Result<(), NngFail> {
    let factory = Latest::default();
    let pusher = factory.pusher_open()?.listen("inproc://test")?;
    let mut push_ctx = pusher.create_async()?;
    Ok(())
}

Associated Types

type ContextType: AsyncContext

The type of aynchronous context produced

Loading content...

Provided methods

fn create_async(&self) -> NngResult<Self::ContextType>

Turns the Socket into an asynchronous context

Loading content...

Implementors

impl AsyncSocket for Pair0[src]

impl AsyncSocket for Pair1[src]

impl AsyncSocket for Pub0[src]

impl AsyncSocket for Pull0[src]

impl AsyncSocket for Push0[src]

impl AsyncSocket for Rep0[src]

impl AsyncSocket for Req0[src]

Loading content...