mbed socket API

Dependents:   EthernetInterface EthernetInterface_RSF EthernetInterface EthernetInterface ... more

Deprecated

This is an mbed 2 sockets library. For mbed 5, network sockets have been revised to better support additional network stacks and thread safety here.

Revision:
18:d56496360fc9
Parent:
16:2d471deff212
--- a/UDPSocket.cpp	Tue May 14 09:48:07 2013 +0000
+++ b/UDPSocket.cpp	Thu May 30 17:15:01 2013 +0100
@@ -59,8 +59,8 @@
     return set_option(IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
 }
 
-int UDPSocket::set_broadcasting(void) {
-    int option = 1;
+int UDPSocket::set_broadcasting(bool broadcast) {
+    int option = (broadcast) ? (1) : (0);
     return set_option(SOL_SOCKET, SO_BROADCAST, &option, sizeof(option));
 }