[−][src]Enum w5500_ll::SocketStatus
Socket status.
This is used with crate::Registers::sn_sr
.
Variants
Socket closed, this is the reset state of all sockets.
This state can be set by a SocketCommand::Disconnect
or
SocketCommand::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 Protocol::Tcp
, and a
SocketCommand::Open
command is sent.
In this state you can use the SocketCommand::Listen
and
SocketCommand::Connect
commands.
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 SocketStatus::Established
when the
connection-request is successfully accepted.
Otherwise the state will change to SocketStatus::Closed
after the
TCP timeout duration set by
crate::Registers::rcr
and crate::Registers::rtr
.
Connection request (SYN packet) has been sent to a peer.
This is temporarily displayed between the SocketStatus::Init
and
SocketStatus::Established
states, after a SocketCommand::Connect
command has been sent.
If the SYN/ACK is received from the peer the state changes to
SocketStatus::Established
, otherwise the state changes to
SocketStatus::Closed
after the TCP timeout duration set by
crate::Registers::rcr
and crate::Registers::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 SocketStatus::Established
,
otherwise the state changes to SocketStatus::Closed
after the TCP
timeout duration set by crate::Registers::rcr
and
crate::Registers::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
SocketCommand::Connect
.
When operating as a TCP server this state is set after a client
connects when in the SocketStatus::Listen
state.
While in this state data can be transfered with the
SocketCommand::Send
and SocketCommand::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 SocketCommand::Disconnect
command is used.
For just-closing the SocketCommand::Close
command is used.
Temporary status between status transitions.
Socket is opened in UDP mode.
This state is set when the socket protocol is Protocol::Udp
, and a
SocketCommand::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 Protocol::Macraw
, and
a SocketCommand::Open
command is sent.
Trait Implementations
impl Clone for SocketStatus
[src]
pub fn clone(&self) -> SocketStatus
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SocketStatus
[src]
impl Debug for SocketStatus
[src]
impl Default for SocketStatus
[src]
impl Eq for SocketStatus
[src]
impl Hash for SocketStatus
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for SocketStatus
[src]
pub fn cmp(&self, other: &SocketStatus) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<SocketStatus> for SocketStatus
[src]
pub fn eq(&self, other: &SocketStatus) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<SocketStatus> for SocketStatus
[src]
pub fn partial_cmp(&self, other: &SocketStatus) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for SocketStatus
[src]
impl StructuralPartialEq for SocketStatus
[src]
impl TryFrom<u8> for SocketStatus
[src]
type Error = u8
The type returned in the event of a conversion error.
pub fn try_from(val: u8) -> Result<SocketStatus, u8>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,