pub(super) struct RtcEgress {
udp: UdpEgress,
}Expand description
Network output for one RTC worker.
UDP and future TCP adapters share this dispatch boundary without moving session state or protocol-specific send mechanics into the worker.
Fields§
§udp: UdpEgressImplementations§
Source§impl RtcEgress
impl RtcEgress
pub fn new( socket: RtcUdpSocket, candidate_addr: SocketAddr, rtc_metrics: Arc<RtcMetricsRecorder>, ) -> Self
Sourcepub async fn flush(&mut self, transmits: &mut Vec<Transmit>)
pub async fn flush(&mut self, transmits: &mut Vec<Transmit>)
Dispatches staged instructions and retains the vector capacity.
Non-UDP instructions are rejected before any UDP socket wait. The remaining UDP instructions retain their relative order across windows. UDP sources must match the announced candidate, including its port. Rejected instructions and socket failures do not suppress later output. Payloads remain owned until socket I/O completes. No output queue survives a completed flush.
§Failure reporting
Rejections log reason = "unsupported_protocol" or
reason = "source_mismatch". Send failures increment worker transport
I/O counters and emit sampled warnings with category, suppressed
and destination. Warnings include raw_os_error when available.
Unexpected UDP send lengths use the same reporting without retrying
potentially accepted bytes.
The worker awaits the entire flush before applying its next input. Once draining begins, cancellation discards unsubmitted UDP output.
Auto Trait Implementations§
impl Freeze for RtcEgress
impl !RefUnwindSafe for RtcEgress
impl !Send for RtcEgress
impl !Sync for RtcEgress
impl Unpin for RtcEgress
impl UnsafeUnpin for RtcEgress
impl !UnwindSafe for RtcEgress
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more