Rank: Member Groups: Member
Joined: 10/27/2009 Posts: 3 Points: 9
|
why isn't there a way to check an IConnection state? i see the onClose event, but what if you register for the event after the connection is actually closed? will i miss the disconnection event and have a floating object?
Thanks
Amit
|
Rank: Administration Groups: Administration
Joined: 2/15/2008 Posts: 130 Points: 835
|
OnClose event will be fired only after you make any call(read, write) to the connection object. So you should subscribe to the event before making read, write calls.
|
Rank: Member Groups: Member
Joined: 10/27/2009 Posts: 3 Points: 9
|
Thanks, So, to clarify: 1. when i start a ReadAsync operation and the connection is closed, the ReadFailed is called, in addition to the OnClose event, which one is called first? 2. when the read fails, is it only due to connection failure or other reasons? how do i know if the connection is still alive? 3. Can you give me reference to Error codes received in the 'Failed' callbacks?
Amit.
|