jsr356-experts@websocket-spec.java.net

[jsr356-experts] Buffer sizes

From: Mark Thomas <mark_at_homeinbox.net>
Date: Thu, 24 Jan 2013 13:00:54 +0000

Hi,

Currently WebSocketContainer defines buffer sizes using longs. I suspect
that this is to be consistent with the maximum message size defined by
RFC6455. Is a long here really realistic? The only way I can see of
sending a message of that size through our API is with a Writer or an
OutputStream. In those cases fragmenting at Integer.MAX_VALUE does not
seem unreasonable.

Therefore, I'd like to prose that the buffer sizes are defined as ints
rather than longs.

Thoughts?

Mark