Hi fchen,
by calling the <connection>.suspendRead() you can stop reading the socket. Reading will be resumed by calling the <connection>.reaumeRead() method. For an example see http://xsocket.svn.sourceforge.net/viewvc/xsocket/xsocket/core/trunk/src/test/java/org/xsocket/connection/LimitedReadTest.java?view=markup
Gregor
> -----Ursprüngliche Nachricht-----
> Von: "fulichen" <ful...@du...>
> Gesendet: 21.04.08 12:35:09
> An: <xso...@li...>
> Betreff: [xSocket-develop] OutOfMemory exception
Our application need to handle many many connection,
> and the data need time to process,
> because xSocket Dispatcher read data when it is avialable,
> our application often run out of memory.
>
> How we limit Dispatcher data reading, or what can we do to prevent
> OutOfMemoryException?
>
> fchen-----------------------------------------------------------------
> -------- This SF.net email is sponsored by the 2008 JavaOne(SM)
> Conference Don't miss this year's exciting event. There's still time
> to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/
> clk;198757673;13503038;p?http://java.sun.com/javaone__________________
> _____________________________ xSocket-develop mailing list xSocket-
> de...@li... https://lists.sourceforge.net/lists/
>
> listinfo/xsocket-develop
--
Gregor Roth
|