pub struct TcpListener { /* private fields */ }Implementations§
Source§impl TcpListener
impl TcpListener
Sourcepub fn validate_config(_config: &TcpListenerConfig) -> Result<(), ListenerError>
pub fn validate_config(_config: &TcpListenerConfig) -> Result<(), ListenerError>
Validate that a worker can build this TCP listener configuration WITHOUT
constructing the full listener or binding a socket. TCP listener
construction has no fallible config today (no rustls context, no answer
templates; a bad bind surfaces later as an ActivateListener failure),
so this currently always succeeds. It exists for surface parity with the
HTTP/HTTPS validators the main process calls before committing an
Add*Listener to ConfigState and fanning it out (sozu#1301), and is
the hook for any future TCP-config validation.
pub fn activate( &mut self, registry: &Registry, tcp_listener: Option<MioTcpListener>, ) -> Result<Token, ProxyError>
Sourcepub fn update_config(
&mut self,
patch: &UpdateTcpListenerConfig,
) -> Result<(), ListenerError>
pub fn update_config( &mut self, patch: &UpdateTcpListenerConfig, ) -> Result<(), ListenerError>
Apply a partial-update patch to this TCP listener’s live configuration.
Fields absent in the patch (i.e. None) are preserved unchanged.
Trait Implementations§
Source§impl ListenerHandler for TcpListener
impl ListenerHandler for TcpListener
fn get_addr(&self) -> &SocketAddr
fn protocol(&self) -> Protocol
fn public_address(&self) -> SocketAddr
Auto Trait Implementations§
impl !Freeze for TcpListener
impl RefUnwindSafe for TcpListener
impl Send for TcpListener
impl Sync for TcpListener
impl Unpin for TcpListener
impl UnsafeUnpin for TcpListener
impl UnwindSafe for TcpListener
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