Skip to main content

ReceiveMessageMeta

Struct ReceiveMessageMeta 

Source
pub struct ReceiveMessageMeta {
    pub namelen: u32,
    pub controllen: u32,
    pub payloadlen: u32,
    pub flags: MessageFlags,
    pub address: Option<SocketAddr>,
    pub fds: Vec<OwnedFd>,
}
Expand description

Métadonnées d’une réception recvmsg via io_uring, adossées à struct io_uring_recvmsg_out (namelen/controllen/payloadlen/flags), étendues des FD matérialisés et de l’adresse pair décodée.

Pour le recvmsg one-shot du Temps 2b, ces scalaires proviennent du msghdr réécrit par le kernel ; le format io_uring_recvmsg_out préfixé au buffer est la variante multishot (Temps 3d).

Fields§

§namelen: u32

Longueur de l’adresse pair écrite (msg_namelen).

§controllen: u32

Longueur des données de contrôle écrites (msg_controllen).

§payloadlen: u32

Longueur de la charge utile reçue (octets de données).

§flags: MessageFlags

Drapeaux retournés par le kernel (msg_flags).

§address: Option<SocketAddr>

Adresse du pair décodée (si namelen > 0).

§fds: Vec<OwnedFd>

FD reçus via SCM_RIGHTS, matérialisés en OwnedFd CLOEXEC.

Implementations§

Source§

impl ReceiveMessageMeta

Source

pub fn payload_truncated(&self) -> bool

MSG_TRUNC : la charge utile a été tronquée (buffers de données trop petits) — des octets ont été perdus.

Source

pub fn control_truncated(&self) -> bool

MSG_CTRUNC : les données de contrôle ont été tronquées (buffer de contrôle trop petit) — des FD ont pu être perdus (fermés proprement par la façade, aucune fuite).

Trait Implementations§

Source§

impl Debug for ReceiveMessageMeta

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.