ABL electronic PIC Microcontrollers PIC18 User Manual

Page of 312
mikroC - C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
184
MikroElektronika:  Development  tools  -  Books  -  Compilers
page
Prototype
void
Eth_Tcp_Response(void);
Description
Performs user response to TCP/IP event. User specifies data to be sent, depending on the
request received (HTTP, HTTPD, FTP, etc). This is performed by the function
Eth_Set_Tcp_Data
.
Requires
Hardware requirements are as specified for the entire library. Prior to using this func-
tion, user must prepare the data to be sent through TCP; see 
Eth_Set_Tcp_Data
.
Example
Eth_Tcp_Response();
Eth_Tcp_Response
Prototype
void
Eth_Set_Tcp_Data(const unsigned short *data);
Description
Prepares data to be sent on HTTP request. This library can handle only HTTP requests,
so sending other TCP-based protocols, such as FTP, will cause an error. Note that
TCP/IP was not designed with 8-bit MCU’s in mind, so be gentle with your HTTP
requests.
Requires
As specified for the entire library.
Example
// Let's prepare a simple HTML page in our string:
const char
httpPage1[] =
"HTTP/1.0 200 OK\nContent-type: text/html\n"
"<html>\n" "<body>\n"
"<h1>Hello world!</h1>\n"
"</body>\n" "</html>";
//...
Eth_Set_Tcp_Data(httpPage1);
//...
Eth_Set_Tcp_Data