Menu

#3 Saner exception handling

open
None
5
2005-05-11
2005-04-11
No

This patch implements local exception handling (in
contrast to the previous exception handling that took
place in NioWorker.poll). This results in better
connection state notification capabilities. For
instance, the NioSocket subclasses now receive the
channel closed event in all circumstances (save for
bugs); before, it wouldn't properly detect a connection
closed by the peer among other cases.

In other words, "closed" is now an asynchronous event
and not something one has to be expecting when reading
or a writing. In my opinion, this fits better the model
currently in place.

Some ideas were taken from pkwooster's NIO threads in
Sun's Java Forums.

This patch probably depends on my previous patches, all
of which are available at the project's SourceForge
patch tracker.

Discussion

  • Javier Kohen

    Javier Kohen - 2005-04-11
     
  • Javier Kohen

    Javier Kohen - 2005-04-11

    Logged In: YES
    user_id=68628

    I just found out that, as a side effect, closed connection
    immediately pass to the CLOSED status instead of remaining
    TIME_WAIT (see netstat). That is a good side effect :-)

     
  • Thomas Kläger

    Thomas Kläger - 2005-05-11
    • assigned_to: nobody --> tomy
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.