protected void CheckForStateChange(object ct, EventArgs ce_args) {
bool con = this.IsConnected;
ConnectionState new_state;
if( con ) {
new_state = Node.ConnectionState.Connected;
}
else {
/*
* The only other state change that is triggered by a Connection
* or Disconnection event is SeekingConnections
*/
new_state = Node.ConnectionState.SeekingConnections;
}
bool success;
SetConState(new_state, out success);
if( success ) {
SendStateChange(new_state);
}
}