WIZ Proto Makers 3th Lab 2
Dependencies: WIZnetInterface mbed
Fork of WIZ_Proto_Makers_3th_Lab1 by
Revision 2:6a79ff33db7f, committed 2016-02-03
- Comitter:
- Ricky_Kwon
- Date:
- Wed Feb 03 03:16:46 2016 +0000
- Parent:
- 1:a4e5ec9f59cc
- Commit message:
- WIZ Proto Makers 3th Lab 2
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a4e5ec9f59cc -r 6a79ff33db7f main.cpp --- 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); + } }