UdpSocket::Send(Packet) is now limited to UdpSocket::MaxDatagramSize, so that data is never split into multiple datagrams, which removes a lot of potential major problems

This commit is contained in:
Laurent Gomila 2011-06-11 11:28:43 +02:00
parent 79d5217c42
commit 175cddee58
6 changed files with 89 additions and 98 deletions

View file

@ -197,8 +197,11 @@ Socket::Status TcpSocket::Connect(const IpAddress& remoteAddress, unsigned short
////////////////////////////////////////////////////////////
void TcpSocket::Disconnect()
{
// Simply close the socket
// Close the socket
Close();
// Reset the pending packet data
myPendingPacket = PendingPacket();
}
@ -354,4 +357,14 @@ Socket::Status TcpSocket::Receive(Packet& packet)
return Done;
}
////////////////////////////////////////////////////////////
TcpSocket::PendingPacket::PendingPacket() :
Size (0),
SizeReceived(0),
Data ()
{
}
} // namespace sf