tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Heil (Mailinglisten)" <li...@steffen-heil.de>
Subject AW: AW: WebSocket asynchronous reads
Date Sun, 06 Sep 2015 20:33:06 GMT
Hi


> > Which means I have to either buffer all incoming messages until I am
> > ready to process them (might occupy lots of memory) or I have to drop
> > them. Both is not really ideal.
> I'm largely ignorant of the asynchronous world, but I do have a question about what you're
asking. Are you really asking if Tomcat can
> buffer all that data for you (which might occupy lots of memory) until you are ready
to accept it? It seems like if you aren't comfortable
> with dropping the data on the floor, then it's your responsibility to accept the data
and deal with it yourself, right?

No.
I am asking tomcat not to read data from the socket, if the app is not ready to receive it
in the first place.
The data will then stay in the os inbound buffers and fill up the receive window, so the *sender*
will be blocked eventually.
TCP allows the sender to know, when the receiver cannot handle more data right away, just
the websocket api cannot.

Regards,
  Steffen


Mime
View raw message