Thursday 15 January 2015

java - Are Socket's events queued in Flash? -


I try to apply a binary protocol by using TCP / IP sockets between a flash application and a custom Java server The message of the protocol is of variable length, so my idea is to add an area that indicates the number of bytes to read before a full message is parsed, something like this:

< Pre> bytesToRead = socket.readInteger (); Var BF: Bytererere; Socket.readBytes (bytesToRead); ParseMessage (BF);

So my question is: If a message comes from other data socket (when it is done) while processing a message, then type message progress event. SOKKET_DATA is queued, so how much is the number of my handlers, reached at least (in this case) the number of messages that have been called or should I read until all the data socket is available? Or simple:

ProgreeEvent.SOCKET_DATA event in general messages for a handlined line in the Flash The bar is sent when the socket receives the data. Basically every time your Java server calls socket.write (); Or socket.writeln (), you should get the entire message in ProgreeEvent.SOCKET_DATA unless you are certainly sending partial messages.

The answer to this question is expected of your question.


No comments:

Post a Comment