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:
parent
79d5217c42
commit
175cddee58
6 changed files with 89 additions and 98 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue