Esempio n. 1
0
        private void Dispose(bool disposing)
        {
            if (this.poller == null)
            {
                return;
            }

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

            this.poller = null;
        }
Esempio n. 2
0
		private void Dispose(bool disposing)
		{
			if (this.poller == null)
			{
				return;
			}

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

			this.poller = null;
		}
Esempio n. 3
0
 /// <summary>
 /// 只能做client
 /// </summary>
 public UService()
 {
     this.poller = new UPoller();
 }
Esempio n. 4
0
 /// <summary>
 /// 即可做client也可做server
 /// </summary>
 /// <param name="host"></param>
 /// <param name="port"></param>
 public UService(string host, int port)
 {
     this.poller = new UPoller(host, (ushort)port);
 }
Esempio n. 5
0
		public USocket(UPoller poller)
		{
			this.poller = poller;
		}
Esempio n. 6
0
		public USocket(IntPtr peerPtr, UPoller poller)
		{
			this.poller = poller;
			this.peerPtr = peerPtr;
		}
Esempio n. 7
0
 public USocket(UPoller poller)
 {
     this.poller = poller;
 }
Esempio n. 8
0
 public USocket(IntPtr peerPtr, UPoller poller)
 {
     this.poller  = poller;
     this.peerPtr = peerPtr;
 }
Esempio n. 9
0
		/// <summary>
		/// 只能做client
		/// </summary>
		public UService()
		{
			this.poller = new UPoller();
		}
Esempio n. 10
0
		/// <summary>
		/// 即可做client也可做server
		/// </summary>
		/// <param name="host"></param>
		/// <param name="port"></param>
		public UService(string host, int port)
		{
			this.poller = new UPoller(host, (ushort) port);
		}