Datasheet

'This is HTTP request
#<script>document.write(REQ)</script></BODY></HTML>';
var getRequest : array[15] of byte; // HTTP request buffer
dyna : array[31] of byte; // buffer for dynamic
response
httpCounter : word ; // counter of HTTP requests
function SPI_Ethernet_UserTCP(var remoteHost : array[4] of byte;
remotePort, localPort, reqLength : word) : word;
function SPI_Ethernet_UserUDP(var remoteHost : array[4] of byte;
remotePort, destPort, reqLength : word) : word;
implementation
{*******************************************
* user defined functions
*}
{*
* put the constant string pointed to by s to the ENC transmit buffer
*}
function putConstString(const s: ^byte) : word;
begin
result := 0;
while(s^ <> 0) do
begin
SPI_Ethernet_putByte(s^) ;
s := s + 1;
result := result + 1 ;
end;
end;
{*
* put the string pointed to by s to the ENC transmit buffer
*}
function putString(var s : array[100] of byte) : word;
begin
result := 0 ;
while(s[result] <> 0) do
begin
SPI_Ethernet_putByte(s[result]) ;
result := result + 1 ;
end;
end;
{*
* this function is called by the library
* the user accesses to the HTTP request by successive calls to
SPI_Ethernet_getByte()
395
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6