TCP,UDP, ECHO
Dependencies: mbed mbed-rtos EthernetInterface
Diff: main.cpp
- Revision:
- 9:aca4ef49f633
- Parent:
- 8:23b1fba109b0
--- a/main.cpp Tue Feb 14 16:20:16 2017 +0000 +++ b/main.cpp Wed Sep 25 16:35:42 2019 +0000 @@ -7,14 +7,14 @@ EthernetInterface eth; eth.init(); //Use DHCP eth.connect(); - printf("\nServer IP Address is %s\n", eth.getIPAddress()); + printf("\r\nServer IP Address is %s\n", eth.getIPAddress()); TCPSocketServer server; server.bind(ECHO_SERVER_PORT); server.listen(); while (true) { - printf("\nWait for new connection...\n"); + printf("\r\nWait for new connection...\n"); TCPSocketConnection client; server.accept(client); client.set_blocking(false, 1500); // Timeout after (1.5)s