UDPNetworkUtility accepts addresses by value, encapsulated ClientData

I started encapsulating ClientData, and I added the internals for the
heartbeat ssytem. However, when I took a look inside UDPNetworkUtility, I
realized that I didn't have to pass the IPaddresses by reference anymore.
Therefore, I've changed it to accept the addresses by value, and I'm
committing that change right away before I finish the heartbeat system.

This engine is really shaping up, I think.
This commit is contained in:
Kayne Ruse
2014-09-03 01:59:53 +10:00
parent 06922dc820
commit 79c7e48139
7 changed files with 79 additions and 25 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ public:
//bind to a channel
int Bind(const char* ip, int port, int channel = -1);
int Bind(IPaddress* add, int channel = -1);
int Bind(IPaddress add, int channel = -1);
void Unbind(int channel);
IPaddress* GetIPAddress(int channel) {
@@ -45,14 +45,14 @@ public:
//send a buffer
int SendTo(const char* ip, int port, void* data, int len);
int SendTo(IPaddress* add, void* data, int len);
int SendTo(IPaddress add, void* data, int len);
int SendTo(int channel, void* data, int len);
int SendToAllChannels(void* data, int len);
int Receive();
//send a SerialPacketBase
int SendTo(const char* ip, int port, SerialPacketBase* serialPacket);
int SendTo(IPaddress* add, SerialPacketBase* serialPacket);
int SendTo(IPaddress add, SerialPacketBase* serialPacket);
int SendTo(int channel, SerialPacketBase* serialPacket);
int SendToAllChannels(SerialPacketBase* serialPacket);
int Receive(SerialPacketBase* serialPacket);