Re: [xSocket-develop] receiving data outsite onData method
Status: Inactive
Brought to you by:
grro
|
From: quan n. h. <hu...@gm...> - 2010-01-13 07:53:28
|
thanks for reply my server module using INonblockingConnection to send/receive data with client. In addition, it must receive/send-respon HANDSHAKE message with client to maintain connection. i use call back handler (implements IDataHandler) to send/receive Handshake message with client & other thread A to send/receive other message. the problem: my thread A send data to client well, but when it receive data response it throw exception. -Quan On Wed, Jan 13, 2010 at 1:49 PM, Gregor Roth <gre...@gm...> wrote: > Hi, > > the read methods of NonblockingConnection returns immediately. If not enough > data is received, a read method such as readLong() or readStringByLength(…) > will throw a BufferUnderflow exception -> the read methods never block by > calling. This is not true for the BlockingConnction. In this case a read > methods blocks (waits) for more data if not enough is available. > > Gregor > > > > ----- Original Message ----- > > From: Gregor Roth > > Sent: 01/13/10 05:43 AM > > To: quan nguyen huu > > Subject: [xSocket-develop] receiving data outsite onData method > > > > hi > > i have a thread using INonBlockingConnection outsite xSocket thread to > send & receiving data with client (my program is server). > > it send ok, but when receive data, it throw exception: > java.io.BufferUnderflowException (because it conflict with onData > thread of xSocket ??) > > i try add ConnectionUtils.synchronizedConnection method but it still > throw error. > > any suggest? > > thanks > -Quan > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |