Unity Version: 6000.2.6f2
Fish-Networking Version: V4, commit 2742f2379a8fbcfe6c38f788f3354bbdd806284f (the latest)
Troubleshooting link in Discord: no link, according to https://fish-networking.gitbook.io/docs/guides/troubleshooting/creating-bug-reports
Description:
If any extra BasePacketLayer is in use and it change the resulting size of packet (in bytes) like "packet padding" technique, the final value of data length still equals packet.Size before any modifications.
Here the existing code of SendBroadcast method:
broadcastSuccess = _udpSocketv4.SendTo(packet.RawData, 0, packet.Size, SocketFlags.None, new IPEndPoint(IPAddress.Broadcast, port)) > 0;
if (_udpSocketv6 != null)
{
multicastSuccess = _udpSocketv6.SendTo(packet.RawData, 0, packet.Size, SocketFlags.None, new IPEndPoint(MulticastAddressV6, port)) > 0;
}
Expected behavior:
The resulting size of data to send must equals the calculated data length from extra BasePacketLayer.
Here what it should be:
extraPacketLayer.ProcessOutBoundPacket(ref emptyEp, ref packet.RawData, ref checksumComputeStart, ref packetSize);
broadcastSuccess = _udpSocketv4.SendTo(packet.RawData, 0, packetSize, SocketFlags.None, new IPEndPoint(IPAddress.Broadcast, port)) > 0;
if (_udpSocketv6 != null)
{
multicastSuccess = _udpSocketv6.SendTo(packet.RawData, 0, packetSize, SocketFlags.None, new IPEndPoint(MulticastAddressV6, port)) > 0;
}
Unity Version: 6000.2.6f2
Fish-Networking Version: V4, commit
2742f2379a8fbcfe6c38f788f3354bbdd806284f(the latest)Troubleshooting link in Discord: no link, according to https://fish-networking.gitbook.io/docs/guides/troubleshooting/creating-bug-reports
Description:
If any extra
BasePacketLayeris in use and it change the resulting size of packet (in bytes) like "packet padding" technique, the final value of data length still equalspacket.Sizebefore any modifications.Here the existing code of
SendBroadcastmethod:Expected behavior:
The resulting size of data to send must equals the calculated data length from extra
BasePacketLayer.Here what it should be: