Trait rotor_stream::Accepted [] [src]

pub trait Accepted: Machine {
    type Seed: Clone;
    type Socket: StreamSocket;
    fn accepted(sock: Self::Socket, seed: Self::Seed, scope: &mut Scope<Self::Context>) -> Response<Self, Void>;
}

Trait which must be implemented for a state machine to accept connection

This basically provides alternative constructor for the state machine.

Associated Types

type Seed: Clone

type Socket: StreamSocket

Required Methods

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

The constructor of the state machine from the accepted connection

Implementors