
Lab2 : TCP serverLab2 : TCP server
Sources : main.c serial.c socket.c w5100.c
☞ Setting the MAC, Subnet, gateway and IP address
setSUBR(ip);
setGAR(ip);
sysinit(0x55,0x55);
☞ Make TCP socket and listen
k t(SOCK DATA S MR TCP 5000 0 20)
soc
e
_
,
n_
_
,
,
x
;
listen(SOCK_DATA);
☞ Checking the socket status
sock_state = getSn_SR(SOCK_DATA);
☞ Receive the TCP data
len = recv
SOCK
DATA
sock
buf
len
18 | page
Copyright 2007 © WIZnet Inc. All rights reserved.
Commentaires sur ces manuels