W5100E01-AVR WIZnet, W5100E01-AVR Datasheet - Page 68

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
Since web_server() is TCP server program, it is built in the similar way as loopback_tcps() as explained in
Chapter
web_server() calls proc_http() that processes HTTP request message from web browser at
SOCK_ESTABLISHED of the http socket.
After calling function proc_http(), it waits until the HTTP response message to HTTP request from web
browser, and then calls disconnect() to close the http socket.
This socket close is called Active Close and, in the case, EVB B/D requests the close to the client first. For
your reference, Passive Close is where client requests disconnection first. The reason why web server
program supports Active Close is that EVB B/D supports the connection with other clients.
Declare & Initialize Local Variables
u_char * http_request = RX_BUF
SOCK_ESTABLISHED
SOCK_CLOSE_WAIT
Select Socket Status
3.2.6.1. Difference between web_server() and loopback_tcps() is in the data communication codes.
SOCK_CLOSED?
web_server()
getSn_SR()
?
?
N
N
© Copyright 2007 WIZnet Co., Inc. All rights reserved.
Y
Y
Y
socket(ch,SOCK_STREAM,port,flag)
Wait a connetion with a client
len = getSn_RX_RSR()
Select Recieved Size
Create a TCP Socket
<Fig 3.18: web_server()>
Close Socket
NBlisten(ch)
close(ch)
RETURN
len > 0
N
Y
http_proc(ch,http_request,len)
Process the HTTP Message
recv(ch,http_request,len)
Wait for sending the HTTP
Response completely
Receive the Data
Close Socket
close(ch)
58

Related parts for W5100E01-AVR