[MUD-Dev] Modular Design Issues RFC

Ryan Rhodes ryanshaerhodes at hotmail.com
Thu Mar 1 05:12:58 CET 2001


Scion Altera wrote:
> Thursday, February 15, 2001, 3:12:42 AM, Ryan Rhodes wrote:

>> The only way to generate a Connection Closed exception for thread
>> death is to be constantly blocking for input.  Java doesn't allow
>> you to stop blocking once you have started, nor does it provide any
>> sort of asynchronous method to read input.  You can check for the
>> ammount of input available before you read it, reading in just
>> enough to prevent blocking, but then you can't capture link death.

> That is not entirely true. You can poll connections in Java
> (checking whether input is available or not), and it is true that
> you cannot tell if a connection is dead by reading from it. However,
> if you try to write to a connection that is dead, you get an
> IOException thrown.  

Your like the third person that has told me they were catching link
death off of writes instead of reads.  I just went back and tried it
again and I still can't get an IOException from a print or println.
I'm starting to wonder if this is particular to Linux???  What Stream
object are you using for your connections?  PrintWriter?  PrintStream?
something else?  I've tried this from the begining and it has never
worked.  If you can tell me how, please do.

Ryan Rhodes

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list