Enum w5500_ll::SocketStatus[][src]

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Writes the defmt representation of self to fmt.

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests for !=.

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

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

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.