Re: [xSocket-develop] ClosedChannelException after Server.close()
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-06-17 05:51:45
|
Hi Robert, in case of a disconnect the IDataHandler handler will be called before performing the IDisconnectHandler (if present). By performing a connection's read method a ClosedChannelException will be thrown. To check if the channel is open, just call the INonBlockingConnection's available() method. This method will return -1 in case of a closed channel. Please consider the different cases of disconnecting (see tutorial). Sometime connections break in such a way that the VM doesn't detect this. Such disconnects will only be detected by performing read or write operations. Gregor 2008/6/16 Robert Wierschke <wie...@go...>: > Hi, > > I'm getting a ClosedChannleException in the server handlers onData method > after calling Server.close(). > > Why does this happen? > > regards > robert > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > > |