Beispiel #1
0
		public bool AddTCPClient(int ID, TcpClient client)
		{
			#if DEBUG
			Debug.Assert(null != client);
			#endif // DEBUG
			if (sessions.ContainsKey(ID))
			{
				return false;
			}

			var session = new TCPSessionInfo(client, setting);
			sessions[ID] = session;

			session.DoBkgSend = DoBkgSend;
			session.DoBkgReceive = DoBkgReceive;
			return true;
		}
Beispiel #2
0
			public static OperateData Create(TCPSessionInfo s, Operate opt, params object[] args)
			{
				return new OperateData(s, opt, args);
			}
Beispiel #3
0
			public OperateData(TCPSessionInfo s, Operate o, object[] a = null)
			{
				session = s;
				opt = o;
				args = a;
			}