I'm using a poll() in my server (in Perl, but it could be C,
and it could be select() instead of poll() - doesn't matter).

When poll() reported there is incoming data by POLLIN event,
I was calling my subroutine to read incoming data.

But I don't want to read 2 bytes and then later (on next poll() result)
the rest data eventhough I'm using writeUTF() at the
Flash client side - because it is not effective this way.

So I'm always calling read(..., ..., 8192) to try to read more bytes at once.

And my error was, that I was trying to extract just
_one_ UTF string with 2 bytes prefix from the buffer.

But in fact I should do it in a loop, because there could be several
such strings+prefixes in the 8192 bytes long incoming buffer.

Regards
Alex

On Mon, May 23, 2011 at 10:33 AM, allandt bik-elliott
(thefieldcomic.com) <alla...@gmail.com> wrote:
> What was the issue?
> On May 19, 2011 2:07 PM, "Alexander Farber" <alexander.far...@gmail.com>
> wrote:
>> Nevermind, found 1 issue in my server...
>> _
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to