![Wiznet W7500 Reference Manual Download Page 90](http://html.mh-extra.com/html/wiznet/w7500/w7500_reference-manual_990600090.webp)
W7500x Reference Manual Version1.1.0
90 / 399
to ‘TCP server’ configured by Sn_DIPR & Sn_DPORT(destination
address & port). If the connect-request is successful, the Sn_SR is
changed to SOCK_ESTABLISHED and the Sn_IR(0) becomes ‘1’.
The connect-request fails in the following three cases.
1. When a ARP
TO
occurs (Sn_IR(3)=‘1’) because the
destination hardware address is not acquired through the
ARP-process.
2. When a SYN/ACK packet is not received and TCP
TO
(Sn_IR(3) = ‘1 )
3. When a RST packet is received instead of a SYN/ACK
packet.
In these cases, Sn_SR is changed to SOCK_CLOSED.
0x08
DISCON
Valid only in TCP mode.
Regardless of ‘TCP server’ or ‘TCP client’, the DISCON command
processes the disconnect-process (‘Active close’ or ‘Passive
close’).
Active close: it transmits disconnect-request(FIN packet) to the
connected peer
Passive close: When FIN packet is received from peer,
a FIN packet is replied back to the peer.
When the disconnect-process is successful (that is, FIN/ACK
packet is received successfully), Sn_SR is changed to
SOCK_CLOSED. Otherwise, TCP
TO
occurs (Sn_IR(3)=‘1)= and then
Sn_SR is changed to SOCK_CLOSED.
cf> If CLOSE is used instead of DISCON, only Sn_SR is changed to
SOCK_CLOSED without disconnect-process.
If a RST packet is received from a peer during communication,
Sn_SR is unconditionally changed to SOCK_CLOSED.
0x10
CLOSE
Close Socket n.
Sn_SR is changed to SOCK_CLOSED.
0x20
SEND
SEND transmits all the data in the Socket n TX buffer. For more
details, please refer to Socket n TX Free Size Register
(Sn_TX_FSR), Socket n, TX Write Pointer Register (Sn_TX_WR), and
Socket n TX Read Pointer Register(Sn_TX_RD).
0x21
SEND_MAC
Valid only in UDP mode.
The basic operation is same as SEND. Normally SEND transmits
data after destination hardware address is acquired by the