EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 57

no-image

EVB-PIC24

Manufacturer Part Number
EVB-PIC24
Description
Development Boards & Kits - PIC / DSPIC W3150A+EVAL BOARD BASED ON PIC24
Manufacturer
WIZnet
Datasheet

Specifications of EVB-PIC24

Rohs
yes
Product
Development Kits
Interface Type
RS-232
Data Bus Width
16 bit
Dimensions
50 mm x 40 mm
If the server socket is in SOCK_CLOSED status, loopback_tcps() calls socket() with the elements of
Sn_MR_TCP, Listen Port Number, and Option Flag to create TCP server socket.
The socket() function change the socket status as 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 listen status and maintains 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
“listen” to “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 possible 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)
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 2006 WIZnet Co., Inc. All rights reserved.
<Table 3-23: Reference Functions in loopback_tcps()>
s,
Loopback TCP Server program
Create the socket
It puts 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/socket.c
iinChip/socket.c
iinChip/socket.c
iinChip/socket.c
iinChip/socket.c
Location
47

Related parts for EVB-PIC24