W5100E01-AVR WIZnet, W5100E01-AVR Datasheet - Page 60

no-image

W5100E01-AVR

Manufacturer Part Number
W5100E01-AVR
Description
Development Boards & Kits - AVR W5100 EVAL BOARD BASED ON AVR
Manufacturer
WIZnet
Datasheet

Specifications of W5100E01-AVR

Rohs
yes
Product
Development Boards
Tool Is For Evaluation Of
ATMEGA128
Core
AVR8
Interface Type
LAN, RS-232
Operating Supply Voltage
5 V
Data Bus Width
8 bit
If the server socket is in SOCK_CLOSED status, loopback_tcps() calls socket() with the elements of
SOCK_STREAM, Listen Port Number, and Option Flag to create TCP server socket.
The socket() function changes the socket status to SOCK_INIT regardless of the previous socket status. If
the server socket is created successfully, it’s put in TCP Server mode after calling listen() with the server
socket as the parameter. listen() makes the server socket status as SOCK_LISTEN status and maintains
SOCK_LISTEN status until any client’s connection.
At this point, when any client tries to connect to the server socket, the server socket status is changed from
SOCK_LISTEN to SOCK_ESTABLISHED. This is when the connection between Client and Server is
complete and data transfer is possible in SOCK_ESTABLISHED status.
Data is transferred using recv() and send() at the SOCK_ESTABLISHED. The data transfer here is 1-on-1
transfer between EVB B/D(The server) and AX1(The client).
In the SOCK_ESTABLISHED status, if the client requests closing of the connection, the server socket status
is changed from SOCK_ESTABLISHED to SOCK_CLOSE_WAIT. In SOCK_CLOSE_WAIT status, data
communication is not available and the server socket must be closed. In SOCK_CLOSE_WAIT status,
disconnect() is called to close socket. disconnect() changes the socket status to SOCK_CLOSED regardless
of previous socket status.
void loopback_tcps(u_char ch)
uint8 getSn_SR(SOCKET s)
uint16
getSn_RX_RSR(SOCKET s)
u_char
u_char protocol, u_int port,
u_char flag)
u_char listen(SOCKET s)
u_int send(SOCKET s,
const u_char * buf, u_int len)
u_int recv(SOCKET s,
u_char * buf, u_int len)
void disconnect(SOCKET s);
Function Name
socket(SOCKET
© Copyright 2007 WIZnet Co., Inc. All rights reserved.
<Table 3-23: Reference Functions in loopback_tcps()>
s,
Loopback TCP Server program
Get the socket status
size of data transmittable, and received
data
Create the socket
It sets related socket as server mode
Transfer the data to the connected socket.
Receive the data to the connected socket.
Close the connection of the socket.
Description
app/loopback.c
iinChip/w5100.c
iinChip/w5100.c
iinChip/socket.c
iinChip/socket.c
iinChip/socket.c
iinChip/socket.c
iinChip/socket.c
Location
50

Related parts for W5100E01-AVR