pub struct HttpSession { /* private fields */ }
Expand description
HTTP Session to insert in the SessionManager
1 session <=> 1 HTTP connection (client to sozu)
Implementations§
Source§impl HttpSession
impl HttpSession
pub fn new( answers: Rc<RefCell<HttpAnswers>>, configured_backend_timeout: Duration, configured_connect_timeout: Duration, configured_frontend_timeout: Duration, configured_request_timeout: Duration, expect_proxy: bool, listener: Rc<RefCell<HttpListener>>, pool: Weak<RefCell<Pool>>, proxy: Rc<RefCell<HttpProxy>>, public_address: SocketAddr, sock: TcpStream, sticky_name: String, token: Token, wait_time: Duration, ) -> Result<Self, AcceptError>
pub fn upgrade(&mut self) -> bool
Trait Implementations§
Source§impl ProxySession for HttpSession
impl ProxySession for HttpSession
Source§fn close(&mut self)
fn close(&mut self)
close a session, frontend and backend sockets,
remove the entries from the session manager slab
Source§fn timeout(&mut self, token: Token) -> bool
fn timeout(&mut self, token: Token) -> bool
if a timeout associated with the session triggers, the event loop will
call this method with the timeout’s token
Source§fn update_readiness(&mut self, token: Token, events: Ready)
fn update_readiness(&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
Source§fn ready(&mut self, session: Rc<RefCell<dyn ProxySession>>) -> bool
fn ready(&mut self, session: Rc<RefCell<dyn ProxySession>>) -> bool
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
Source§fn shutting_down(&mut self) -> bool
fn shutting_down(&mut self) -> bool
tell the session it has 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_session(&self)
fn print_session(&self)
display the session’s internal state (for debugging purpose)
Source§fn frontend_token(&self) -> Token
fn frontend_token(&self) -> Token
get the token associated with the frontend
Auto Trait Implementations§
impl !Freeze for HttpSession
impl !RefUnwindSafe for HttpSession
impl !Send for HttpSession
impl !Sync for HttpSession
impl Unpin for HttpSession
impl !UnwindSafe for HttpSession
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more