Example program for the BSDInterface
Dependencies: BSDInterface NetworkSocketAPI
Fork of HelloLWIPInterface by
Revision 15:e48b3c6558b1, committed 2015-07-16
- Comitter:
- sam_grove
- Date:
- Thu Jul 16 05:20:12 2015 +0000
- Parent:
- 14:c47437f5dae8
- Child:
- 16:bb0a5b830dc5
- Commit message:
- small formatting updates
Changed in this revision
--- a/NetworkSocketAPI.lib Wed Jul 15 23:23:14 2015 +0000 +++ b/NetworkSocketAPI.lib Thu Jul 16 05:20:12 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#47c32687a44c +http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#ab3679eb4d9d
--- a/WiFiRadioInterface.lib Wed Jul 15 23:23:14 2015 +0000 +++ b/WiFiRadioInterface.lib Thu Jul 16 05:20:12 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/NetworkSocketAPI/code/WiFiRadioInterface/#b2f781416464 +http://developer.mbed.org/teams/NetworkSocketAPI/code/WiFiRadioInterface/#c3f4095337b8
--- a/main.cpp Wed Jul 15 23:23:14 2015 +0000 +++ b/main.cpp Thu Jul 16 05:20:12 2015 +0000 @@ -16,7 +16,6 @@ #include "mbed.h" #include "WiFiRadioInterface.h" -#include <map> DigitalOut myled(LED1); @@ -37,7 +36,7 @@ printf("MAC: %s\r\n", wifi.getMACAddress()); SocketInterface* myTCPSocket = wifi.allocateSocket(SOCK_TCP); - SocketInterface* myUDPSocket = wifi.allocateSocket(SOCK_TCP); + SocketInterface* myUDPSocket = wifi.allocateSocket(SOCK_UDP); myTCPSocket->setAddress(myTCPSocket->getHostByName("www.google.com")); myTCPSocket->setAddress("216.58.192.46");