private void ExceptionCaught(object sender, IoSessionExceptionEventArgs e) { Debug.Log(e.Exception); e.Session.Close(true); connector.Dispose(); thread.Abort(); isConnected = false; Debug.Log("client ExceptionCaught"); }
/******************************/ /* Events */ /******************************/ #region Events /// <summary> /// HandleException /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HandleException(Object sender, IoSessionExceptionEventArgs e) { _logger.Info(String.Format("Exception {0}", e.Exception.Message)); }
private void ExceptionCaught(object sender, IoSessionExceptionEventArgs e) { Debug.Log(e.Exception); e.Session.Close(true); Debug.Log("server ExceptionCaught"); }
/******************************/ /* Server Events */ /******************************/ #region Server Events /// <summary> /// ExceptionCaught /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void ExceptionCaught(object sender, IoSessionExceptionEventArgs e) { ScreenOutput(String.Format("Exception on {0}", e.Session.RemoteEndPoint)); ScreenOutput(e.Exception.Message); }