Ignore:
Timestamp:
Dec 4, 2010, 2:08:59 PM (11 years ago)
Author:
Sven Rech
Message:

better p2p world behaviour

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypP2P/Internal/ConnectionManager.cs

    r2129 r2164  
    2828
    2929        public delegate void P2PConnectionStateChangeEventHandler(object sender, bool newState);
     30        public delegate void P2PTryConnectingStateChangeEventHandler(object sender, bool newState);
     31
     32        #endregion
     33
     34        #region Events
     35
     36        public event P2PConnectionStateChangeEventHandler OnP2PConnectionStateChangeOccurred;
     37        public event P2PTryConnectingStateChangeEventHandler OnP2PTryConnectingStateChangeOccurred;
    3038
    3139        #endregion
     
    7381        }
    7482
    75         public bool IsConnecting { get; internal set; }
    76         public event P2PConnectionStateChangeEventHandler OnP2PConnectionStateChangeOccurred;
     83        private bool isConnecting;
     84        public bool IsConnecting {
     85            get { return isConnecting; }
     86            internal set
     87            {
     88                isConnecting = value;
     89                if (OnP2PTryConnectingStateChangeOccurred != null)
     90                {
     91                    OnP2PTryConnectingStateChangeOccurred(this, isConnecting);
     92                }
     93            }
     94        }
    7795
    7896        public void Connect()
Note: See TracChangeset for help on using the changeset viewer.