comparison core/UdpClient.cpp @ 274:cf98c06c72fd prerelease

merge
author Liam Donovan <l.b.donovan@qmul.ac.uk>
date Tue, 17 May 2016 16:42:02 +0100
parents 247a182adb6d
children a14fe8b0f588
comparison
equal deleted inserted replaced
273:0ee6eebb567a 274:cf98c06c72fd
6 */ 6 */
7 #include "UdpClient.h" 7 #include "UdpClient.h"
8 8
9 UdpClient::UdpClient(){ 9 UdpClient::UdpClient(){
10 outSocket=socket(AF_INET, SOCK_DGRAM, 0); 10 outSocket=socket(AF_INET, SOCK_DGRAM, 0);
11 int broadcastEnable = 1;
12 int ret = setsockopt(outSocket, SOL_SOCKET, SO_BROADCAST, &broadcastEnable, sizeof(broadcastEnable));
13 printf("setsockopt returned %d\n", ret);
11 isSetPort=false; 14 isSetPort=false;
12 isSetServer=false; 15 isSetServer=false;
13 enabled=false; 16 enabled=false;
14 } 17 }
15 UdpClient::UdpClient(int aPort, const char* aServerName){ 18 UdpClient::UdpClient(int aPort, const char* aServerName){