Error with compressed UDP messages

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Jormungandr
Posts: 5
Joined: 09 Feb 2010, 20:48

Error with compressed UDP messages

Postby Jormungandr » 31 Mar 2011, 15:48

I get the following error when receiving compressed UDP packets in the Unity client (RC2).

The SFSObjects in question contain a bunch of ByteArrays, which may be part of this, but this feels like a case that should work...

Code: Select all

UDPSocketLayer: General error reading data from socket: Invalid SFSDataType. Expected: SFS_OBJECT, found: 120   at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
  at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Binary2Object (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
  at Sfs2X.Entities.Data.SFSObject.NewFromBinaryData (Sfs2X.Util.ByteArray ba) [0x00000] in <filename unknown>:0
  at Sfs2X.Bitswarm.UDPManager.OnUDPData (System.Byte[] bt) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.UDPSocketLayer.CallOnData (System.Byte[] data) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.UDPSocketLayer.HandleBinaryData (System.Byte[] buf) [0x00000] in <filename unknown>:0
  at Sfs2X.Core.Sockets.UDPSocketLayer.Read () [0x00000] in <filename unknown>:0
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 31 Mar 2011, 17:50

Will investigate - thanks for the bug report!

/T
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Jormungandr
Posts: 5
Joined: 09 Feb 2010, 20:48

Postby Jormungandr » 05 Apr 2011, 21:04

Thanks!

I've also recently seen another error that may be related, though this one is on the server, when the client sends it large UDP packets, e.g.:

Code: Select all

2011-04-05 16:59:25,023 WARN  [SocketReader] v2.protocol.SFSIoHandler - Discard UDP packet from 127.0.0.1:56856, reason: Packet truncated. Expected: 2911, only got: 1021
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 07 Apr 2011, 08:27

Jormungandr wrote:Thanks!

I've also recently seen another error that may be related, though this one is on the server, when the client sends it large UDP packets, e.g.:

Code: Select all

2011-04-05 16:59:25,023 WARN  [SocketReader] v2.protocol.SFSIoHandler - Discard UDP packet from 127.0.0.1:56856, reason: Packet truncated. Expected: 2911, only got: 1021


Read the "remarks" in the initUDP method description.
Paolo Bax
The SmartFoxServer Team
Jormungandr
Posts: 5
Joined: 09 Feb 2010, 20:48

Postby Jormungandr » 07 Apr 2011, 15:01

Ah, yes, that does explain it.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 73 guests