pub struct TcpProxy { /* private fields */ }Implementations§
Source§impl TcpProxy
impl TcpProxy
pub fn new( registry: Registry, sessions: Rc<RefCell<SessionManager>>, pool: Rc<RefCell<Pool>>, backends: Rc<RefCell<BackendMap>>, ) -> TcpProxy
pub fn add_listener( &mut self, config: TcpListenerConfig, token: Token, ) -> Result<Token, ProxyError>
pub fn remove_listener(&mut self, address: SocketAddr) -> bool
pub fn activate_listener( &self, addr: &SocketAddr, tcp_listener: Option<MioTcpListener>, ) -> Result<Token, ProxyError>
pub fn give_back_listeners(&mut self) -> Vec<(SocketAddr, MioTcpListener)>
pub fn give_back_listener( &mut self, address: SocketAddr, ) -> Result<(Token, MioTcpListener), ProxyError>
Sourcepub fn update_listener(
&mut self,
patch: UpdateTcpListenerConfig,
) -> Result<(), ProxyError>
pub fn update_listener( &mut self, patch: UpdateTcpListenerConfig, ) -> Result<(), ProxyError>
Apply a partial-update patch to the identified TCP listener.
pub fn add_tcp_front( &mut self, front: RequestTcpFrontend, ) -> Result<(), ProxyError>
pub fn remove_tcp_front( &mut self, front: RequestTcpFrontend, ) -> Result<(), ProxyError>
Trait Implementations§
Source§impl ProxyConfiguration for TcpProxy
impl ProxyConfiguration for TcpProxy
fn notify(&mut self, message: WorkerRequest) -> WorkerResponse
fn accept(&mut self, token: ListenToken) -> Result<MioTcpStream, AcceptError>
fn create_session( &mut self, frontend_sock: MioTcpStream, token: ListenToken, wait_time: Duration, proxy: Rc<RefCell<Self>>, ) -> Result<(), AcceptError>
Auto Trait Implementations§
impl !RefUnwindSafe for TcpProxy
impl !Send for TcpProxy
impl !Sync for TcpProxy
impl !UnwindSafe for TcpProxy
impl Freeze for TcpProxy
impl Unpin for TcpProxy
impl UnsafeUnpin for TcpProxy
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