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
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.
The socket is opened in TCP mode.
This state is set when the socket protocol is Tcp
, and a Open
command is sent.
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
.
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
.
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
.
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.
Temporary status between status transitions.
This indicates the socket is closing.
Temporary status between status transitions.
This indicates the socket is closing.
Temporary status between status transitions.
This indicates the socket is closing.
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.
Temporary status between status transitions.
Socket is opened in UDP mode.
This state is set when the socket protocol is Udp
, and a Open
command is sent.
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
Performs the conversion.
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
Auto Trait Implementations
impl RefUnwindSafe for SocketStatus
impl Send for SocketStatus
impl Sync for SocketStatus
impl Unpin for SocketStatus
impl UnwindSafe for SocketStatus
Blanket Implementations
Mutably borrows from an owned value. Read more