pub struct HttpConnectionHandler { /* private fields */ }Expand description
HTTP Proxy handler for accept()ed HTTP clients
It should be created once and then clone() for every individual TCP connections
Implementations§
Source§impl HttpConnectionHandler
impl HttpConnectionHandler
Sourcepub fn new(context: Arc<ServiceContext>, balancer: PingBalancer) -> Self
pub fn new(context: Arc<ServiceContext>, balancer: PingBalancer) -> Self
Create a new Handler
Sourcepub async fn serve_connection<S>(
self,
stream: S,
peer_addr: SocketAddr,
) -> Result<()>
pub async fn serve_connection<S>( self, stream: S, peer_addr: SocketAddr, ) -> Result<()>
Handle a TCP HTTP connection
Trait Implementations§
Source§impl Clone for HttpConnectionHandler
impl Clone for HttpConnectionHandler
Source§fn clone(&self) -> HttpConnectionHandler
fn clone(&self) -> HttpConnectionHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpConnectionHandler
impl !RefUnwindSafe for HttpConnectionHandler
impl Send for HttpConnectionHandler
impl Sync for HttpConnectionHandler
impl Unpin for HttpConnectionHandler
impl !UnwindSafe for HttpConnectionHandler
Blanket Implementations§
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