Trait quic_rpc::ServerChannel
source · pub trait ServerChannel<In: RpcMessage, Out: RpcMessage, T: ChannelTypes>: Debug + Clone + Send + Sync + 'static {
fn accept_bi(&self) -> T::AcceptBiFuture<'_, In, Out>;
fn local_addr(&self) -> &[LocalAddr];
}
Expand description
An abstract server with typed input and output
Required Methods§
sourcefn accept_bi(&self) -> T::AcceptBiFuture<'_, In, Out>
fn accept_bi(&self) -> T::AcceptBiFuture<'_, In, Out>
Accept a bidirectional stream
sourcefn local_addr(&self) -> &[LocalAddr]
fn local_addr(&self) -> &[LocalAddr]
The local addresses this server is bound to.
This is useful for publicly facing addresses when you start the server with a random
port, :0
and let the kernel choose the real bind address. This will return the
address with the actual port used.