A simple HTTP server echoing received requests. Ethernet connection is over an ENC28J60 board. Usage: Type the server's IP address into you web browser and hit <ENTER>.
Diff: main.cpp
- Revision:
- 8:9e3b50f6dc81
- Parent:
- 7:f6058bcaa614
- Child:
- 9:66b6c19e9bb7
--- a/main.cpp Fri Aug 30 14:14:59 2019 +0000 +++ b/main.cpp Tue Sep 03 09:43:41 2019 +0000 @@ -39,6 +39,9 @@ printf("IP address: %s\r\n", ip ? ip : "None"); printf("Netmask: %s\r\n", netmask ? netmask : "None"); printf("Gateway: %s\r\n\r\n", gateway ? gateway : "None"); + printf("------------------------------------------------------\r\n"); + printf("Usage: Type %s into your web browser and hit ENTER\r\n", net.get_ip_address()); + printf("------------------------------------------------------\r\n"); /* Open the server on ethernet stack */ server.open(&net); @@ -68,8 +71,7 @@ client->send((uint8_t*)receiveBuf, receiveLen); printf("Echo done.\r\n"); } + client->close(); } - - client->close(); } }