sources/network/udpsocket.cpp

branch
protocol5
changeset 153
82aac80a2f1d
parent 150
37db42ad451a
parent 152
6be21be4bea1
child 159
970d58a01e8b
--- a/sources/network/udpsocket.cpp	Wed Jul 20 17:57:35 2016 +0300
+++ b/sources/network/udpsocket.cpp	Wed Jul 20 18:24:13 2016 +0300
@@ -137,10 +137,11 @@
 
 	unsigned char decodedPacket[MAX_DATAGRAM_LENGTH];
 	int decodedLength = sizeof decodedPacket;
-	HUFFMAN_Decode (reinterpret_cast<unsigned char*>(HuffmanBuffer), decodedPacket, length, &decodedLength);
-	datagram.from.host = ntohl (claddr.sin_addr.s_addr);
-	datagram.from.port = ntohs (claddr.sin_port);
-	datagram.data = Bytestream (decodedPacket, decodedLength);
+	HUFFMAN_Decode (reinterpret_cast<unsigned char*> (HuffmanBuffer),
+		decodedPacket, length, &decodedLength);
+	datagram.address.host = ntohl (claddr.sin_addr.s_addr);
+	datagram.address.port = ntohs (claddr.sin_port);
+	datagram.message = Bytestream (decodedPacket, decodedLength);
 	return true;
 }
 

mercurial