comparison core/UdpServer.cpp @ 54:d3f869b98147 ultra-staging

Udp transmission working (enough) for demo in Nottingham
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 08 Jun 2015 01:07:48 +0100
parents 6907e2177eb8
children 2197435e8fb4
comparison
equal deleted inserted replaced
53:6907e2177eb8 54:d3f869b98147
11 }; 11 };
12 UdpServer::UdpServer(){ 12 UdpServer::UdpServer(){
13 init(0); 13 init(0);
14 } 14 }
15 UdpServer::~UdpServer(){ 15 UdpServer::~UdpServer(){
16 16 //TODO: unbind from port. AFAIK, this involves closing the socket, therefore creating the socket should become part of bindToPort
17 }; 17 };
18 bool UdpServer::init(int aPort){ 18 bool UdpServer::init(int aPort){
19 enabled=true; 19 enabled=true;
20 stTimeOut.tv_sec = 0; //set timeout to 0 20 stTimeOut.tv_sec = 0; //set timeout to 0
21 stTimeOut.tv_usec = 0; 21 stTimeOut.tv_usec = 0;