Free Wed Editor CoffeeFreeHTML15.0
Dependencies: WIZnetInterface mbed
Fork of WIZ_Proto_Makers_4th_Lab1 by
Diff: main.cpp
- Revision:
- 2:6a79ff33db7f
- Parent:
- 1:a4e5ec9f59cc
- Child:
- 3:eb6b286cf2bd
--- a/main.cpp Wed Feb 03 03:08:13 2016 +0000 +++ b/main.cpp Wed Feb 03 03:16:46 2016 +0000 @@ -3,6 +3,15 @@ #define WEB_SERVER_PORT 80 +char send_dat[]="HTTP/1.1 200 OK\r\n"\ + "Content-Type: text/html\r\n"\ + "Connection: close\r\n\r\n"\ + "<html>\r\n"\ + "<body>"\ + "Hello world"\ + "</body>\r\n"\ + "</html>\r\n"; + int main (void) { printf("Wait a second...\r\n"); @@ -39,6 +48,12 @@ //buffer[n] = '\0'; printf("rev_dat : %s\r\n", buffer); + + if((buffer[0]=='G')&&(buffer[1]=='E')&&(buffer[2]=='T')&&(buffer[3]==' '))// GET_Request + { + client.send(send_dat, sizeof(send_dat)); + printf("send_dat : %s\r\n", send_dat); + } }