# HG changeset patch # User Giulio Moro # Date 1440208299 -3600 # Node ID 23137a333c93fb37de24d4b0c0b0d0cc010ff1e8 # Parent d6245d5880c5bff88bbead32d9c37e0627d27c1e Implemented destructor of UdpServer which closes the socket diff -r d6245d5880c5 -r 23137a333c93 core/UdpServer.cpp --- a/core/UdpServer.cpp Sat Aug 22 02:50:57 2015 +0100 +++ b/core/UdpServer.cpp Sat Aug 22 02:51:39 2015 +0100 @@ -13,6 +13,8 @@ init(0); } UdpServer::~UdpServer(){ + printf("Close the socket\n"); + shutdown(inSocket, 0); //Stop receiving data for this socket. If further data arrives, reject it. //TODO: unbind from port. AFAIK, this involves closing the socket, therefore creating the socket should become part of bindToPort }; bool UdpServer::init(int aPort){