Enum w5500_ll::SocketStatus[][src]

#[repr(u8)]
pub enum SocketStatus {
Show variants Closed, Init, Listen, SynSent, SynRecv, Established, FinWait, Closing, TimeWait, CloseWait, LastAck, Udp, Macraw,
}

Socket status.

This is used with the sn_sr method.

Variants

Closed

Socket closed, this is the reset state of all sockets.

This state can be set by a Disconnect or Close command.

This state will also be set automatically if a timeout occurs.

Init

The socket is opened in TCP mode.

This state is set when the socket protocol is Tcp, and a Open command is sent.

In this state you can use the Listen and Connect commands.

Listen

The socket is listening, operating as a TCP server.

The socket will wait for a connextion-request (SYN packet) from a peer (TCP client).

The state will change to Established when the connection-request is successfully accepted. Otherwise the state will change to Closed after the TCP timeout duration set by rcr and rtr.

SynSent

Connection request (SYN packet) has been sent to a peer.

This is temporarily displayed between the Init and Established states, after a Connect command has been sent.

If the SYN/ACK is received from the peer the state changes to Established, otherwise the state changes to Closed after the TCP timeout duration set by rcr and rtr.

SynRecv

Connection request (SYN packet) has been received from a peer.

If the socket sends the response (SYN/ACK packet) to the peer successfully the state changes to Established, otherwise the state changes to Closed after the TCP timeout duration set by rcr and rtr.

Established

TCP connection is established.

When operating as a TCP client this state is set after the TCP server accepts the SYN packet, which is sent by the client after issuing a Connect.

When operating as a TCP server this state is set after a client connects when in the Listen state.

While in this state data can be transfered with the Send and Recv commands.

FinWait

Temporary status between status transitions.

This indicates the socket is closing.

Closing

Temporary status between status transitions.

This indicates the socket is closing.

TimeWait

Temporary status between status transitions.

This indicates the socket is closing.

CloseWait

The socket has received the disconnect-request (FIN pakcet) from the connected peer.

This is half-closing status, and data can be transferred.

For full-closing the Disconnect command is used.

For just-closing the Close command is used.

LastAck

Temporary status between status transitions.

Udp

Socket is opened in UDP mode.

This state is set when the socket protocol is Udp, and a Open command is sent.

Macraw

Socket is opened in MACRAW mode.

This is valid only for socket 0.

This state is set when the socket protocol is Macraw, and a Open command is sent.

Trait Implementations

impl Clone for SocketStatus[src]

fn clone(&self) -> SocketStatus[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for SocketStatus[src]

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

Formats the value using the given formatter. Read more

impl Default for SocketStatus[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl Hash for SocketStatus[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Ord for SocketStatus[src]

fn cmp(&self, other: &SocketStatus) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl PartialEq<SocketStatus> for SocketStatus[src]

fn eq(&self, other: &SocketStatus) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialOrd<SocketStatus> for SocketStatus[src]

fn partial_cmp(&self, other: &SocketStatus) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl TryFrom<u8> for SocketStatus[src]

type Error = u8

The type returned in the event of a conversion error.

fn try_from(val: u8) -> Result<SocketStatus, u8>[src]

Performs the conversion.

impl Copy for SocketStatus[src]

impl Eq for SocketStatus[src]

impl StructuralEq for SocketStatus[src]

impl StructuralPartialEq for SocketStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.