Enum rotor_stream::Accept [] [src]

pub enum Accept<M, A: TryAccept + Sized> where A::Output: StreamSocket, M: Accepted<Socket=A::Output> {
    Server(A, M::Seed),
    Connection(M),
}

Socket acceptor State Machine

TODO(tailhook) Currently this panics when there is no slab space when accepting a connection. This may be fixed by sleeping and retrying

Variants

Server
Connection

Methods

impl<M, A> Accept<M, A> where A: TryAccept<Output=M::Socket> + Evented + Any, M: Accepted

fn new<S: GenericScope>(sock: A, seed: M::Seed, scope: &mut S) -> Response<Self, Void>

Trait Implementations

impl<M, A> Machine for Accept<M, A> where A: TryAccept<Output=M::Socket> + Evented + Any, M: Accepted

type Context = M::Context

type Seed = (A::Output, M::Seed)

fn create((sock, seed): Self::Seed, scope: &mut Scope<Self::Context>) -> Response<Self, Void>

fn ready(self, events: EventSet, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn spawned(self, _scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn timeout(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn wakeup(self, scope: &mut Scope<Self::Context>) -> Response<Self, Self::Seed>

fn spawn_error(self, _scope: &mut Scope<Self::Context>, error: SpawnError<Self::Seed>) -> Response<Self, Self::Seed>