pub struct Session { /* private fields */ }
Implementations§
source§impl Session
impl Session
pub fn upgrade(&mut self) -> UpgradeResult
pub fn test_back_socket(&mut self) -> bool
pub fn cancel_timeouts(&mut self)
Trait Implementations§
source§impl ProxyConfiguration<Session> for Proxy
impl ProxyConfiguration<Session> for Proxy
fn notify(&mut self, message: ProxyRequest) -> ProxyResponse
fn accept(&mut self, token: ListenToken) -> Result<TcpStream, AcceptError>
fn create_session(
&mut self,
frontend_sock: TcpStream,
token: ListenToken,
wait_time: Duration,
proxy: Rc<RefCell<Self>>
) -> Result<(), AcceptError>
source§impl ProxySession for Session
impl ProxySession for Session
source§fn timeout(&mut self, token: Token)
fn timeout(&mut self, token: Token)
if a timeout associated with the session triggers, the event loop will
call this method with the timeout’s token Read more
source§fn process_events(&mut self, token: Token, events: Ready)
fn process_events(&mut self, token: Token, events: Ready)
if the event loop got an event for a token associated with the session,
it will call this method on the session Read more
source§fn ready(&mut self, session: Rc<RefCell<dyn ProxySession>>)
fn ready(&mut self, session: Rc<RefCell<dyn ProxySession>>)
if a session received an event or can still execute, the event loop will
call this method. Its result indicates if it can still execute, needs to
connect to a backend server, close the session Read more
source§fn shutting_down(&mut self)
fn shutting_down(&mut self)
tells the session to shut down if possible Read more
source§fn last_event(&self) -> Instant
fn last_event(&self) -> Instant
last time the session got an event
source§fn print_state(&self)
fn print_state(&self)
displays the session’s internal state (for debugging purpose)