Struct quilkin_xds::net::TcpListener
source · pub struct TcpListener { /* private fields */ }
Expand description
TCP listener for a GRPC service, always binds to the local IPv6 address
Implementations§
source§impl TcpListener
impl TcpListener
sourcepub fn bind(port: Option<u16>) -> Result<Self>
pub fn bind(port: Option<u16>) -> Result<Self>
Binds a TCP listener, if None
is passed, binds to an ephemeral port
sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Retrieves the local address the listener is bound to
pub fn into_stream(self) -> Result<TcpListenerStream>
Trait Implementations§
source§impl From<TcpListener> for TcpListener
impl From<TcpListener> for TcpListener
source§fn from(value: TcpListener) -> Self
fn from(value: TcpListener) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for TcpListener
impl Send for TcpListener
impl Sync for TcpListener
impl Unpin for TcpListener
impl UnwindSafe for TcpListener
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request