ETdoFresh/FishyEOS

Issue with EOS.GetCachedP2PInterface().ReceivePacket in CommonPeer.cs

Closed this issue · 0 comments

Hi ETdoFresh,

Thanks for creating FishyEOS. I'm excited to jump in and get started using it.

I just installed this into a new project and when I get through installing FishNet, EOS Plugin and configuring it, then adding FishyEOS I get these errors:

Library\PackageCache\com.etdofresh.fishyeos@c94679d\Core\CommonPeer.cs(145,21): error CS1620: Argument 2 must be passed with the 'ref' keyword

Library\PackageCache\com.etdofresh.fishyeos@c94679d\Core\CommonPeer.cs(145,39): error CS1620: Argument 3 must be passed with the 'ref' keyword

Digging into the code a bit I can see that on line 145 it is calling the function EOS.GetCachedP2PInterface().ReceivePacket but it seems that it doesn't match the parameters required by the ReceievePacket function. It might have been updated recently in the newer version of EOS but I haven't dug into the release notes to find out if that is the case. As a workaround, I updated that line of the code to be:

SocketId socketId = new SocketId();
var receivePacketResult = EOS.GetCachedP2PInterface().ReceivePacket(ref receivePacketOptions, ref remoteUserId, ref socketId, out var channelByte, data, out _);

which resolved the errors for now but I did want to bring it to your attention just in case.