
just example
Revision 3:a3eca89133b7, committed 2018-11-01
- Comitter:
- asaewing
- Date:
- Thu Nov 01 09:21:31 2018 +0000
- Parent:
- 2:e72bc303ea90
- Commit message:
- First save
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os-tcp-server-example.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jun 26 09:28:54 2017 +0000 +++ b/main.cpp Thu Nov 01 09:21:31 2018 +0000 @@ -32,6 +32,7 @@ eth.connect(); printf("The target IP address is '%s'\n", eth.get_ip_address()); + printf("The target MAC address is '%s'\n", eth.get_mac_address()); TCPServer srv; TCPSocket clt_sock; @@ -47,8 +48,13 @@ srv.listen(5); while (true) { + printf("The target IP address is '%s'\n", eth.get_ip_address()); + printf("The target MAC address is '%s'\n", eth.get_mac_address()); + srv.accept(&clt_sock, &clt_addr); printf("accept %s:%d\n", clt_addr.get_ip_address(), clt_addr.get_port()); clt_sock.send(HTTP_RESPONSE, strlen(HTTP_RESPONSE)); + + wait(5); } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os-tcp-server-example.lib Thu Nov 01 09:21:31 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/teams/ST/code/mbed-os-tcp-server-example/#e72bc303ea90