Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: WIZnetInterface mbed
Fork of WIZ_Proto_Makers_3th_Lab2 by
Diff: main.cpp
- Revision:
- 2:6a79ff33db7f
- Parent:
- 1:a4e5ec9f59cc
- Child:
- 3:eb6b286cf2bd
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); + } }