GroupZ - 05012018 1511
Revision 3:da9b27c64089, committed 2018-01-09
- Comitter:
- mslade
- Date:
- Tue Jan 09 15:08:58 2018 +0000
- Parent:
- 2:15f6847a70ab
- Commit message:
- full version;
Changed in this revision
Ethernet/ethernet.cpp | Show diff for this revision Revisions of this file |
mbed-os/mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 15f6847a70ab -r da9b27c64089 Ethernet/ethernet.cpp --- a/Ethernet/ethernet.cpp Tue Jan 09 15:01:34 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -//#if !FEATURE_LWIP -// #error [NOT_SUPPORTED] LWIP not supported for this target -//#endif -// -//#include "mbed.h" -//#include "EthernetInterface.h" -//#include "TCPServer.h" -//#include "TCPSocket.h" -// -//#define HTTP_STATUS_LINE "HTTP/1.0 200 OK" -//#define HTTP_HEADER_FIELDS "Content-Type: text/html; charset=utf-8" -//#define HTTP_MESSAGE_BODY "" \ -//"<html>" "\r\n" \ -//" <body style=\"display:flex;text-align:center\">" "\r\n" \ -//" <div style=\"margin:auto\">" "\r\n" \ -//" <h1>Hello World</h1>" "\r\n" \ -//" <p>It works !</p>" "\r\n" \ -//" </div>" "\r\n" \ -//" </body>" "\r\n" \ -//"</html>" -// -//#define HTTP_RESPONSE HTTP_STATUS_LINE "\r\n" \ -// HTTP_HEADER_FIELDS "\r\n" \ -// "\r\n" \ -// HTTP_MESSAGE_BODY "\r\n" -// -//#define IP "10.0.0.10" -//#define NETMASK "255.0.0.0" -//#define GATEWAY "10.0.0.1" -// -// -//int main() -//{ -// printf("Basic HTTP server example\n"); -// -// //Configure an ethernet connection -// EthernetInterface eth; -// eth.set_network(IP, NETMASK, GATEWAY); -// eth.connect(); -// printf("The target IP address is '%s'\n", eth.get_ip_address()); -// -// //Now setup a web server -// TCPServer srv; //TCP/IP Server -// TCPSocket clt_sock; //Socket for communication -// SocketAddress clt_addr; //Address of incoming connection -// -// /* Open the server on ethernet stack */ -// srv.open(ð); -// -// /* Bind the HTTP port (TCP 80) to the server */ -// srv.bind(eth.get_ip_address(), 80); -// -// /* Can handle 5 simultaneous connections */ -// srv.listen(5); -// -// while (true) { -// //Block and wait on an incoming connection -// srv.accept(&clt_sock, &clt_addr); -// printf("accept %s:%d\n", clt_addr.get_ip_address(), clt_addr.get_port()); -// -// //Send static HTML response -// clt_sock.send(HTTP_RESPONSE, strlen(HTTP_RESPONSE)); -// } -//}
diff -r 15f6847a70ab -r da9b27c64089 mbed-os/mbed-os.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os/mbed-os.lib Tue Jan 09 15:08:58 2018 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#2b4ff78ab0a52ef1dc3f2998908453c595e2b2c0