示例#1
0
 protected virtual void OnSocketException(SocketExceptionEventArgs e)
 {
    if (SocketException != null)
       SocketException(this, e);
 }
示例#2
0
      private void HandleSocketException(object sender, SocketExceptionEventArgs e)
      {
         s_log.ErrorFormat("Socket threw exception: {0}", e.Exception.Message);

         // Notify the subscribers of the Disconnected event.
         OnDisconnected(new DisconnectedEventArgs(String.Format("{0}", e.Exception.Message)));

         // Clean up the socket management since there's no connected socket anymore.
         Disconnect();
      }