EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 58

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
3.2.6.2.
Loopback TCP Client
At Loopback TCP Client program, EVB B/D works in client mode and AX1, PC test program, works in server
mode. EVB B/D tries to connect to AX1 which is waiting as the server, if the connection is successful EVB
B/D receives data stream through TCP channel and then EVB B/D sends back the received data stream to
AX1 without processing.
Loopback TCP client program is created with loopback_tcpc() and <Fig 3.15> is processing procedure of
loopback_tcpc().
If the client socket is in SOCK_CLOSED status, loopback_tcpc() calls socket() with the elements of
Sn_MR_TCP, Any Port Number, and Option Flag to create TCP client socket.
In creating socket here, any port number is used for get_system_any_port(). This is because connection may
be failed if it tries to connect to the same server with same port number. After successfully creating the
socket, call connect() with the elements of the client socket to connect to the AX1 server.
connect() makes the socket status into SOCK_SYNSENT and keeps the status as SOCK_SYNSENT until it
receives the authorization for connection from the server. If the connection is successful the socket status is
changed from SOCK_SYNSENT to SOCK_ESTABLISHED. In SOCK_ESTABLISHED status the operation is
same as explained for loopback_tcps().
48
© Copyright 2006 WIZnet Co., Inc. All rights reserved.

Related parts for EVB-PIC24