UDPNetworkUtility is a singleton, disabled InCombat scene

I found incombat to be way too finicky to keep up to date, so I disabled
it for now.
This commit is contained in:
Kayne Ruse
2014-08-13 06:53:43 +10:00
parent 182101b592
commit 74f809a801
15 changed files with 41 additions and 42 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
#include <stdexcept>
//NOTE: memset() is used before sending a packet to remove old data; you don't want to send sensitive data over the network
//BUGFIX: memset() is used before sending a packet to remove old data; you don't want to send sensitive data over the network
//NOTE: don't confuse SerialPacket with UDPpacket
void UDPNetworkUtility::Open(int port) {
+11 -6
View File
@@ -22,15 +22,15 @@
#ifndef UDPNETWORKUTILITY_HPP_
#define UDPNETWORKUTILITY_HPP_
//common
#include "serial_packet.hpp"
#include "singleton.hpp"
//APIs
#include "SDL/SDL_net.h"
#include "serial_packet.hpp"
class UDPNetworkUtility {
class UDPNetworkUtility : public Singleton<UDPNetworkUtility> {
public:
UDPNetworkUtility() = default;
~UDPNetworkUtility() = default;
void Open(int port);
void Close();
@@ -65,6 +65,11 @@ public:
return socket;
}
private:
friend Singleton<UDPNetworkUtility>;
UDPNetworkUtility() = default;
~UDPNetworkUtility() = default;
UDPsocket socket = nullptr;
UDPpacket* packet = nullptr;
};