WebSocket: to flip or not the ByteBuffer during sendBinary in RemoteEndpoint(s)

2013-06-28 Thread Niki Dokovski
Hi folks, while playing around with tyrus and tomcat implementation of websocket I spotted a difference in the way sendBinary is actually implemented. In short: tyrus uses bytebuffer.array(), hence there is no change in buffer's position while we end with channel write operation that does this.

Re: WebSocket: to flip or not the ByteBuffer during sendBinary in RemoteEndpoint(s)

2013-06-28 Thread Mark Thomas
On 28/06/2013 12:47, Niki Dokovski wrote: Hi folks, while playing around with tyrus and tomcat implementation of websocket I spotted a difference in the way sendBinary is actually implemented. In short: tyrus uses bytebuffer.array(), hence there is no change in buffer's position while we end

Re: WebSocket: to flip or not the ByteBuffer during sendBinary in RemoteEndpoint(s)

2013-06-28 Thread Niki Dokovski
On Fri, Jun 28, 2013 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 28/06/2013 12:47, Niki Dokovski wrote: Hi folks, while playing around with tyrus and tomcat implementation of websocket I spotted a difference in the way sendBinary is actually implemented. In short: tyrus uses

Re: WebSocket: to flip or not the ByteBuffer during sendBinary in RemoteEndpoint(s)

2013-06-28 Thread Niki Dokovski
On Fri, Jun 28, 2013 at 3:57 PM, Niki Dokovski nick...@gmail.com wrote: On Fri, Jun 28, 2013 at 3:44 PM, Mark Thomas ma...@apache.org wrote: On 28/06/2013 12:47, Niki Dokovski wrote: Hi folks, while playing around with tyrus and tomcat implementation of websocket I spotted a