]>
git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/tests/net/helloworld/multicast_send/main.cpp
2 #include "EthernetInterface.h"
4 const char* MCAST_GRP
= "224.1.1.1";
5 const int MCAST_PORT
= 5007;
15 Endpoint multicast_group
;
16 multicast_group
.set_address(MCAST_GRP
, MCAST_PORT
);
18 char out_buffer
[] = "very important data";
20 printf("Multicast to group: %s\n", MCAST_GRP
);
21 sock
.sendTo(multicast_group
, out_buffer
, sizeof(out_buffer
));