示例#1
0
文件: PollIO.cs 项目: fengqk/Art
		public static PollIO register (PollIO io)
		{
			lock (ionew_locker) {
				ionew[io.channel] = io;
				return io;
			}
		}
示例#2
0
文件: PollIO.cs 项目: fengqk/Art
		private static void UpdateEvent (PollIO io)
		{
			EventType eventtype = io.UpdateEvent ();
			if (eventtype.POLLCLOSE) {
				if (io.Close ()) {
					try {
						io.channel.Close ();
					} catch (Exception) {
					}
                    iomap.Remove(io.channel);
				}
				return;
			}
			if (eventtype.POLLIN)
				rlist.Add (io.channel);
			if (eventtype.POLLOUT)
				wlist.Add (io.channel);
			if (eventtype.POLLERR)
				elist.Add (io.channel);
			channelset.Add (io.channel);
		}