diff -r ce66d7e374bf -r 42bb29924218 sources/network/udpsocket.cpp --- a/sources/network/udpsocket.cpp Wed Jul 20 22:56:16 2016 +0300 +++ b/sources/network/udpsocket.cpp Fri Jul 22 17:50:00 2016 +0300 @@ -135,17 +135,16 @@ decodedPacket, length, &decodedLength); datagram.address.host = ntohl (claddr.sin_addr.s_addr); datagram.address.port = ntohs (claddr.sin_port); - datagram.message = Bytestream (decodedPacket, decodedLength); + datagram.message = Vector(decodedPacket, decodedLength); return true; } // ------------------------------------------------------------------------------------------------- // -bool UDPSocket::send (const IPAddress& address, const Bytestream& data) +bool UDPSocket::send (const IPAddress& address, const Vector& data) { int encodedlength = sizeof HuffmanBuffer; - HUFFMAN_Encode (data.data(), reinterpret_cast (HuffmanBuffer), - data.written_length(), &encodedlength); + HUFFMAN_Encode (data.data(), reinterpret_cast (HuffmanBuffer), data.size(), &encodedlength); sockaddr_in claddr = address.to_sockaddr_in(); int res = ::sendto (m_socket, HuffmanBuffer, encodedlength, 0, reinterpret_cast (&claddr), sizeof claddr);