Hi,

https://javaee-spec.java.net/nonav/javadocs/javax/websocket/OnMessage.html

if i read that, then if i have

onmessage(String)

that i get the whole message as once.

Where is it really specified that that also means that it must also fit in
the input buffer?
So it can't be a partial at all?

For me the difference between this:


onmessage(String msg)
onmessage(String msg,boolean lastPart)

means that i do the streaming my self.. So i take the parts that are there,
store it, save it whatever i want. So that only the buffer size is kept in
memory (so it is really streaming)

If i don't do that "lastPart" that just means that i want the whole message
as once, no matter how it it send to the server, or better said, how it is
handled by tomcat (or what ever webserver) internally , how big input
buffers the webserver uses.

For example tomcat uses by default 8KB. If i know that all my messages are
smaller then that, then i wouldn't do that lastPart boolean. But then my
application is deployed on something else, that has a input buffer size of
4KB and my message doesn't fit in there. Now i suddenly have to do the
partial myself, and my app is broken
This doesn't look right to me.. Because now it really looks to me that all
apps should include always that boolean param.. Because how do you know? Or
you must be really sure that the message are not passing a buffer boundary
(but maybe an implementation uses 256 bytes)

-- 
Johan Compagner
Servoy

Reply via email to