Struct smoltcp::socket::RawSocket [] [src]

pub struct RawSocket<'a, 'b: 'a> { /* fields omitted */ }

A raw IP socket.

A raw socket is bound to a specific IP protocol, and owns transmit and receive packet buffers.

Methods

impl<'a, 'b> RawSocket<'a, 'b>
[src]

[src]

Create a raw IP socket bound to the given IP version and datagram protocol, with the given buffers.

[src]

Return the debug identifier.

[src]

Set the debug identifier.

The debug identifier is a number printed in socket trace messages. It could as well be used by the user code.

[src]

Return the IP version the socket is bound to.

[src]

Return the IP protocol the socket is bound to.

[src]

Check whether the transmit buffer is full.

[src]

Check whether the receive buffer is not empty.

[src]

Enqueue a packet to send, and return a pointer to its payload.

This function returns Err(Error::Exhausted) if the size is greater than the transmit packet buffer size.

If the buffer is filled in a way that does not match the socket's IP version or protocol, the packet will be silently dropped.

Note: The IP header is parsed and reserialized, and may not match the header actually transmitted bit for bit.

[src]

Enqueue a packet to send, and fill it from a slice.

See also send.

[src]

Dequeue a packet, and return a pointer to the payload.

This function returns Err(Error::Exhausted) if the receive buffer is empty.

Note: The IP header is parsed and reserialized, and may not match the header actually received bit for bit.

[src]

Dequeue a packet, and copy the payload into the given slice.

See also recv.

Trait Implementations

impl<'a, 'b: 'a> Debug for RawSocket<'a, 'b>
[src]

[src]

Formats the value using the given formatter.