You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Ricles <jg...@alum.lehigh.edu> on 2014/12/01 16:01:06 UTC

Back to back writes to websocket server weird behavior

I have a binary queue that I am writing to a websocket server written
in java from a client end point with the following code,

        while((bbuf = messageQueue.take()).get(0) != 0)
        {
            bbuf.position(bbuf.limit());
            bbuf.flip();
            for(Session session : sessionList)
            {
                session.getBasicRemote().sendBinary(bbuf);
            }
        }

However sometimes the 2nd message is dropped or the first message is
sent with no data. Why might this be happening, instead of the
messages getting sent correctly with no data lost 100% of the time?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org