aboutsummaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-05-12 00:48:42 +0200
committerStapleButter <thetotalworm@gmail.com>2017-05-12 00:48:42 +0200
commit3b07da3a9794bc594a9710a15b852434bc5e150d (patch)
tree524064d811ece3d31b13d547d99c4d5e98cf5df2 /src/wx
parent01361f006e9ef6d8fd61e95a8bc3f1ac4d749903 (diff)
attempt at actually sending packets.
into the void for now.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/Platform.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wx/Platform.cpp b/src/wx/Platform.cpp
index 71236af..12145f3 100644
--- a/src/wx/Platform.cpp
+++ b/src/wx/Platform.cpp
@@ -117,7 +117,7 @@ void MP_DeInit()
#endif // __WXMSW__
}
-int MP_SendPacket(u8* data, int len, int rate)
+int MP_SendPacket(u8* data, int len)
{
if (MPSocket < 0)
return 0;
@@ -130,14 +130,14 @@ int MP_SendPacket(u8* data, int len, int rate)
*(u32*)&PacketBuffer[0] = htonl(0x4946494E); // NIFI
PacketBuffer[4] = NIFI_VER;
- PacketBuffer[5] = rate & 0xFF;
+ PacketBuffer[5] = 0;
*(u16*)&PacketBuffer[6] = htons(len);
memcpy(&PacketBuffer[8], data, len);
return sendto(MPSocket, (const char*)PacketBuffer, len+8, 0, &MPSendAddr, sizeof(sockaddr_t));
}
-int MP_RecvPacket(u8* data, bool block, int* rate)
+int MP_RecvPacket(u8* data, bool block)
{
if (MPSocket < 0)
return 0;
@@ -181,7 +181,6 @@ int MP_RecvPacket(u8* data, bool block, int* rate)
}
memcpy(data, &PacketBuffer[8], rlen);
- if (rate) *rate = PacketBuffer[5];
return rlen;
}