Steamworks.NET icon indicating copy to clipboard operation
Steamworks.NET copied to clipboard

P2PSessionConnectFail_t not firing more than once per ID

Open TimPickup opened this issue 7 years ago • 2 comments

Hi,

Thanks for your Wrapper. Its very useful!

I'm using it to create a transport layer for Mirror (a replacement for UNET). Its going very well and quite stable, but I have noticed that P2PSessionConnectFail_t only gets called once for each client. Do you know if this is a bug with your layer or Steam?

So I have setup a callback with callback_OnConnectFail = Callback<P2PSessionConnectFail_t>.Create(OnConnectFail);

I then call SteamNetworking.SendP2PPacket for a given steamID that I know will fail.

After a number of seconds it times out at the OnConnectFail is fired.

If I then call SteamNetworking.SendP2PPacket with a different steamID then I get another fail message as expected.

If I call SteamNetworking.SendP2PPacket with a steamID I already had a fail on then I never get a fail message so Im just left waiting for ever

TimPickup avatar Nov 27 '18 02:11 TimPickup

What I found, which I am not sure is because of steams sdk or this wrapper, is that when you receive a p2psessionconnectfail callback, you need to call closep2psessionwithuser in order to get another p2psessionconnectfail.

HiddenMonk avatar Dec 06 '18 15:12 HiddenMonk

I‘m also working on Mirror-steam,and I meet some problem now. I found the SendP2PPacket can't send the data properly and returns 0,that may cause a "EndOfStreamException: Unable to read beyond the end of the stream." on the host. I'm not quite sure how to override the TransportSend since many parameters just gone. I use the length of the pubData as cubData,could it works or cause the problems?

dengbohan avatar Jan 01 '19 16:01 dengbohan