상속: IDisposable
예제 #1
0
        public override void Dispose()
        {
            if (this.poller == null)
            {
                return;
            }

            foreach (long id in this.idChannels.Keys.ToArray())
            {
                UChannel channel = this.idChannels[id];
                channel.Dispose();
            }

            this.poller = null;
        }
예제 #2
0
		public override void Dispose()
		{
			if (this.poller == null)
			{
				return;
			}

			foreach (long id in this.idChannels.Keys.ToArray())
			{
				UChannel channel = this.idChannels[id];
				channel.Dispose();
			}
			
			this.poller = null;
		}
예제 #3
0
        private void Dispose(bool disposing)
        {
            if (this.poller == null)
            {
                return;
            }

            if (disposing)
            {
                foreach (long id in this.idChannels.Keys.ToArray())
                {
                    UChannel channel = this.idChannels[id];
                    channel.Dispose();
                }
                this.poller.Dispose();
            }

            this.poller = null;
        }
예제 #4
0
		/// <summary>
		/// 只能做client
		/// </summary>
		public UService()
		{
			this.poller = new UPoller();
		}
예제 #5
0
		/// <summary>
		/// 即可做client也可做server
		/// </summary>
		public UService(string host, int port)
		{
			this.poller = new UPoller(host, (ushort)port);
		}
예제 #6
0
 /// <summary>
 /// 只能做client
 /// </summary>
 public UService()
 {
     this.poller = new UPoller();
 }
예제 #7
0
		public USocket(UPoller poller)
		{
			this.poller = poller;
		}
예제 #8
0
		public USocket(IntPtr peerPtr, UPoller poller)
		{
			this.poller = poller;
			this.PeerPtr = peerPtr;
		}
예제 #9
0
 public USocket(UPoller poller)
 {
     this.poller = poller;
 }
예제 #10
0
 public USocket(IntPtr peerPtr, UPoller poller)
 {
     this.poller  = poller;
     this.PeerPtr = peerPtr;
 }
예제 #11
0
 /// <summary>
 /// 即可做client也可做server
 /// </summary>
 public UService(string host, int port)
 {
     this.poller = new UPoller(host, (ushort)port);
 }