Issues with multiple byte array calls
Posted: 10 May 2012, 21:10
I'm sending webcam imagery as a sequence of byte arrays, each containing one jpg encoded frame. We had previously been doing this with Unity's built-in RPC functionality, so we know it works. Each frame is around 13kB.
When I tried to send 30 frames / second in two directions between two connected clients, I immediately got all sorts of exotic errors in the SmartFox server log and would be booted in under a second. When I slowed down the stream, from one client only at around 10-20 frames per second it would work for a while longer, but within a few seconds I would get the following error (it's slightly different every time):
10 May 2012 | 20:51:19,658 | WARN | SocketReader | protocol.binary.BinaryIoHandler | null
10 May 2012 | 20:51:19,897 | WARN | SocketReader | v2.protocol.SFSProtocolCodec | Error deserializing request: java.lang.IllegalStateException: Invalid SFSDataType. Expected: 18, found: -70
10 May 2012 | 20:51:19,898 | WARN | SocketReader | protocol.binary.BinaryIoHandler | Illegal request size: -1161512870 bytes, from: ( User Name: User 19, Id: 19, Priv: 0, Sess: 137.75.201.137:58163 )
10 May 2012 | 20:51:19,987 | WARN | SocketReader | protocol.binary.BinaryIoHandler | null
10 May 2012 | 20:51:19,988 | INFO | SocketReader | bitswarm.sessions.DefaultSessionManager | Session removed: { Id: 21, Type: DEFAULT, Logged: Yes, IP: 137.75.201.137:58163 }
10 May 2012 | 20:51:19,988 | INFO | SocketReader | v2.entities.SFSZone | User: User 19 was disconnected.
This was after a few dozen to a few hundred basically identical requests, where the only difference is the actual contents and a slight variation in size of the byte array. Any idea what's going on?
When I tried to send 30 frames / second in two directions between two connected clients, I immediately got all sorts of exotic errors in the SmartFox server log and would be booted in under a second. When I slowed down the stream, from one client only at around 10-20 frames per second it would work for a while longer, but within a few seconds I would get the following error (it's slightly different every time):
10 May 2012 | 20:51:19,658 | WARN | SocketReader | protocol.binary.BinaryIoHandler | null
10 May 2012 | 20:51:19,897 | WARN | SocketReader | v2.protocol.SFSProtocolCodec | Error deserializing request: java.lang.IllegalStateException: Invalid SFSDataType. Expected: 18, found: -70
10 May 2012 | 20:51:19,898 | WARN | SocketReader | protocol.binary.BinaryIoHandler | Illegal request size: -1161512870 bytes, from: ( User Name: User 19, Id: 19, Priv: 0, Sess: 137.75.201.137:58163 )
10 May 2012 | 20:51:19,987 | WARN | SocketReader | protocol.binary.BinaryIoHandler | null
10 May 2012 | 20:51:19,988 | INFO | SocketReader | bitswarm.sessions.DefaultSessionManager | Session removed: { Id: 21, Type: DEFAULT, Logged: Yes, IP: 137.75.201.137:58163 }
10 May 2012 | 20:51:19,988 | INFO | SocketReader | v2.entities.SFSZone | User: User 19 was disconnected.
This was after a few dozen to a few hundred basically identical requests, where the only difference is the actual contents and a slight variation in size of the byte array. Any idea what's going on?