In SFS 2X, I'm having trouble sending a byte array from the server to the client. It's the 32711 bytes found here:
Link
The result is an error thrown from SFS2X client API, even before the SFSEvent.EXTENSION_RESPONSE is dispatched:
Code: Select all
RangeError: Error #2006: The supplied index is out of bounds.
at flash.utils::ByteArray/writeBytes()
at com.smartfoxserver.v2.core::SFSIOHandler/handlePacketData()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSIOHandler.as:216]
at com.smartfoxserver.v2.core::SFSIOHandler/onDataRead()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/core/SFSIOHandler.as:90]
at com.smartfoxserver.v2.bitswarm::BitSwarmClient/onSocketData()[/Users/Lapo/Documents/Flex Builder 3/SFS2X_AS3_API/src/com/smartfoxserver/v2/bitswarm/BitSwarmClient.as:404]
I've already sent several bigger (and smaller) byte arrays to the client, so the problem is not the byte array size.
In a series of tests, I found that removing the last byte from the array will make the code work throwing no errors. But adding that last byte (or any other byte in that position) will break execution.
Any ideias?