[undertow-dev] WebSockets static sendBinary methods.and PooledByteBuffers

Mario Carbajal mario.e.carbajal at gmail.com
Thu Jan 26 14:50:25 EST 2017


>From looking at the source it seems that the WebSockets.sendBinary methods
that take ByteBuffer will take ownership of the buffer, meaning I shouldn't
modify (or return it to a pool) after I pass it to these methods. Is this
correct?

Looking at sendInternal, the buffer passed is then wrapped in a dummy
ImmediatePooledByteBuffer. I could make alternative versions of these
sendBinary methods that take PooledByteBuffer. Allowing me to use pooled
buffers.

Since this functionality is missing it makes me think that there may be a
reason why it shouldn't be done.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20170126/53f3357a/attachment.html 


More information about the undertow-dev mailing list