Exemplo n.º 1
0
 private void Server_ErrorOccurred(object sender, AsyncSocketErrorEventArgs e)
 {
     if (ErrorOccurred != null)
     {
         string errorInfo = String.Format("sessionId={0},在端口{1}监听出错:{2}", this.sessionId, this.serverPort, e.ToString());
         InternalLogger.Log.Error(errorInfo);
         ErrorOccurred(sender, new PivasEventArgs <String>(errorInfo));
     }
 }
Exemplo n.º 2
0
 void ss_ErrorOccurred(object sender, AsyncSocketErrorEventArgs e)
 {
     this.Invoke((MethodInvoker) delegate
     {
         richTextBox1.AppendText(string.Format("----Error: {0}", e.Exception.Message));
         richTextBox1.AppendText(Environment.NewLine);
         richTextBox1.ScrollToCaret();
     });
 }
Exemplo n.º 3
0
        /// <summary>
        /// 出现错误
        /// </summary>
        /// <param name="sender">sender.</param>
        /// <param name="e">AsyncSocketErrorEventArgs.</param>
        private void OnError(object sender, AsyncSocketErrorEventArgs e)
        {
            EventHandler <AsyncSocketErrorEventArgs> temp = Interlocked.CompareExchange(ref this.Error, null, null);

            if (temp != null)
            {
                temp(sender, e);
            }
        }
        /// <summary>
        /// Method OnErrorOccurred.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Instance of AsyncSocketErrorEventArgs.</param>
        private void OnErrorOccurred(object sender, AsyncSocketErrorEventArgs e)
        {
            // Copy a reference to the delegate field now into a temporary field for thread safety
            EventHandler <AsyncSocketErrorEventArgs> temp = Interlocked.CompareExchange(ref this.ErrorOccurred, null, null);

            if (temp != null)
            {
                temp(sender, e);
            }
        }
Exemplo n.º 5
0
 private void OnErrorChecker(object sender, AsyncSocketErrorEventArgs e)
 {
     AppManager.Instance.AddLog(string.Format("체커 에러남 {0}", e.ID));
     foreach (var pData in Checker_Connection_List_)
     {
         if (pData.Value == sender)
         {
             //ChannelInfo_List_[pData.Key].connected_ip_ = "";
             ChannelInfo_List_[pData.Key].checker_status_ = "접속 끊김";
             Checker_Connection_List_.Remove(pData.Key);
             AppManager.Instance.AddLog(string.Format("Checker Error Close {0}", pData.Key));
             break;
         }
     }
 }
Exemplo n.º 6
0
 private void OnError(object sender, AsyncSocketErrorEventArgs e)
 {
     LogManager.Instance.Log(string.Format("private void OnError {0}/{1}", sender.ToString(), e.ToString()));
 }
Exemplo n.º 7
0
 protected void Client_ErrorOccurred(object sender, AsyncSocketErrorEventArgs e)
 {
     InternalLogger.Log.Error(String.Format("DisplayTcpClient({0}:{1}[{2}])通信过程中出错:",
                                            this.serverIp, this.serverPort, this.sessionId) + e.ToString());
 }
Exemplo n.º 8
0
 private void OnError(object sender, AsyncSocketErrorEventArgs e)
 {
 }
Exemplo n.º 9
0
 private void OnError(object sender, AsyncSocketErrorEventArgs e)
 {
     //LogManager.Instance.Log("private void OnError(object sender, AsyncSocketErrorEventArgs e)");
 }
Exemplo n.º 10
0
 private static void server_Error(object sender, AsyncSocketErrorEventArgs e)
 {
     ServerMsg(e.ErrorCode.ToString() + e.Message);
 }
Exemplo n.º 11
0
 private static void client_Error(object sender, AsyncSocketErrorEventArgs e)
 {
     ClientMsg(e.ErrorCode.ToString() + e.Message);
 }
Exemplo n.º 12
0
 public void SelectSocket_OnClientError(object sender, AsyncSocketErrorEventArgs e)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 13
0
 static void tcpServer_ErrorOccurred(object sender, AsyncSocketErrorEventArgs e)
 {
     Console.WriteLine("tcpServer_ErrorOccurred");
 }