jsr356-experts@websocket-spec.java.net

[jsr356-experts] Re: [jsr356-users] Buffer sizes

From: Danny Coward <danny.coward_at_oracle.com>
Date: Fri, 25 Jan 2013 17:10:07 -0800

On 1/24/13 5:00 AM, Mark Thomas wrote:
> 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.
Well, its probably reasonable to implement that maximum on frame sizes,
but on the other hand since the message size is not limited by the spec,
we probably should use the larger capacity to define the limit. Someone
might want it one day !

- Danny

>
> Thoughts?
>
> Mark


-- 
<http://www.oracle.com> 	*Danny Coward *
Java EE
Oracle Corporation