pub struct ServerIngress { /* private fields */ }Expand description
Cloneable admission endpoint returned by super::Server::with_ingress.
A listener owner performs transport-specific setup first, then submits the
ready byte stream with its actual peer address, accepted local address, and
transport classification. Clones share one bounded queue, so awaiting
Self::accept propagates server backpressure instead of creating
unbounded session work.
Implementations§
Source§impl ServerIngress
impl ServerIngress
Sourcepub async fn accept<S>(
&self,
stream: S,
peer: SocketAddr,
local: SocketAddr,
transport: StationTransport,
) -> Result<(), ServerError>where
S: StationIo + 'static,
pub async fn accept<S>(
&self,
stream: S,
peer: SocketAddr,
local: SocketAddr,
transport: StationTransport,
) -> Result<(), ServerError>where
S: StationIo + 'static,
Transfer ownership of an accepted stream to the server run loop.
peer identifies the remote station for events and address policy;
local is the concrete local endpoint used for server-list responses.
transport must describe the already-established stream because it is
checked against the device definition during registration. For secure
admission, complete the handshake and any certificate policy before
calling this method.
The method waits for capacity in the ingress queue. It returns
ServerError::Stopped without starting a session if the run loop has
ended.
Sourcepub async fn accept_with_socket_qos<S, Q>(
&self,
stream: S,
peer: SocketAddr,
local: SocketAddr,
transport: StationTransport,
socket_qos: Q,
) -> Result<(), ServerError>where
S: StationIo + 'static,
Q: StationSocketQos + 'static,
pub async fn accept_with_socket_qos<S, Q>(
&self,
stream: S,
peer: SocketAddr,
local: SocketAddr,
transport: StationTransport,
socket_qos: Q,
) -> Result<(), ServerError>where
S: StationIo + 'static,
Q: StationSocketQos + 'static,
Admit a stream while retaining control of its underlying TCP markings.
The server reapplies the selected station’s signaling policy after the registration message identifies it. Marking failures are logged while registration and subsequent protocol traffic continue normally.
Trait Implementations§
Source§impl Clone for ServerIngress
impl Clone for ServerIngress
Source§fn clone(&self) -> ServerIngress
fn clone(&self) -> ServerIngress
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more