Copy link to clipboard
Copied
Hello,
I'm sending images from a server, in C-berkeley sockets, to a Flash client, both on the same Linux machine:
Anyway, the server never waits more than 40 ms to get a client's request, this is what I measure at least..., so is either Flash or server "lying" to me?
If I connect the same Flash to a "as3-server" (OpenKinect server which gets images from the Microsoft's Kinect), everything is OK.
Maybe there is some issue on the server side but I'm using a dedicated one with the classical functions (bind, accept, read, write and close). Any thoughts?
Regards.
Copy link to clipboard
Copied
I'm experiencing the same issue.
I'm sending images from a C# server to an AS3 client.
Everything is fine, with a transfert time of around 30ms per image.
Then, for no apparent reason images take 300 or 600 or more time to get to the client.
Then, after even some more time, it fixes itself and goes back to 30ms.
- When everything is fine, SOCKET_DATA events contain about 24820 bytes each. (images themselves are 1 to 8MB).
- When the problem occurs, SOCKET_DATA events contain 65636 bytes each, with occasionally lower values.
- It is only some SOCKET_DATA events that takes long to be called back, generally one or two per image sent.
I have series like this:
(normal)
…
socket.bytesAvailable: 24820 bytes. Inactive for 0ms.
socket.bytesAvailable: 24820 bytes. Inactive for 0ms.
socket.bytesAvailable: 24820 bytes. Inactive for 0ms.
…
(slow)
…
socket.bytesAvailable: 65536 bytes. Inactive for 0ms.
socket.bytesAvailable: 25996 bytes. Inactive for 0ms.
socket.bytesAvailable: 6944 bytes. Inactive for 297ms.
socket.bytesAvailable: 65536 bytes. Inactive for 0ms.
…
socket.bytesAvailable: 65536 bytes. Inactive for 0ms.
socket.bytesAvailable: 11104 bytes. Inactive for 0ms.
socket.bytesAvailable: 6944 bytes. Inactive for 273ms.
socket.bytesAvailable: 65536 bytes. Inactive for 0ms.
…
Where "Inactive" is the ammount of time spent between SOCKET_DATA callbacks, outside of my code.
Some packets just take super long to be reconstructed into the byte array and sent to me in the socket data event.
It looks like this happen after a buffer underflow.
I have verified that this behavior is not due to Flash rendering (same problem if I don't display the images or don't do anything else).
Currently my only viable workaround is to detect these long transferts and force a disconnection and reconnection.
Anyone has experienced this and found a better solution or explanation ?