[][src]Trait in_stream::InStreamListener

pub trait InStreamListener<R: Sized + Debug + Send + Sync, W: Sized + Debug + Send + Sync>: Sized + Debug + Send + Sync {
    type Stream: InStream<R, W>;
    fn raw_bind<C: InStreamConfig>(url: &Url2, config: C) -> Result<Self>;
fn binding(&self) -> Url2;
fn accept(&mut self) -> Result<Self::Stream>; }

implement this trait to provide listening/server socket type functionality

Associated Types

type Stream: InStream<R, W>

Loading content...

Required methods

fn raw_bind<C: InStreamConfig>(url: &Url2, config: C) -> Result<Self>

begin listening on the given url spec this function does the actual work of binding, but it is recommended your struct provide a wrapper with a concrete config type

fn binding(&self) -> Url2

access the url for the bound interface

fn accept(&mut self) -> Result<Self::Stream>

attempt to accept a stream/socket from this binding may return Err(ErrorKind::WouldBlock.into())

Loading content...

Implementors

impl<'_, '_> InStreamListener<&'_ mut [u8], &'_ [u8]> for InStreamListenerMem[src]

type Stream = InStreamMem

impl<'_, '_> InStreamListener<&'_ mut [u8], &'_ [u8]> for InStreamListenerTcp[src]

type Stream = InStreamTcp

impl<Sub: InStreamListenerStd, '_> InStreamListener<&'_ mut WsFrame, WsFrame> for InStreamListenerWss<Sub>[src]

type Stream = InStreamWss<Sub::StreamStd>

impl<Sub: InStreamListenerStd, '_, '_> InStreamListener<&'_ mut [u8], &'_ [u8]> for InStreamListenerTls<Sub>[src]

type Stream = InStreamTls<Sub::StreamStd>

fn binding(&self) -> Url2[src]

get our bound address

fn accept(&mut self) -> Result<Self::Stream>[src]

accept an incoming connection

Loading content...