public TcpConn(Socket s, NetworkMgr mgr) { this.agentID = AgentID.Gen(); tcpSocket = s; networkMgr = mgr; writeEventArg.Completed += new EventHandler <SocketAsyncEventArgs>(DoEventComplete); readEventArg.Completed += new EventHandler <SocketAsyncEventArgs>(DoEventComplete); }
public TcpServer(NetworkMgr networkMgr, params Option[] opts) { this.networkMgr = networkMgr; sAgentID = AgentID.Gen(); try { foreach (var x in opts) { x.Do(this); } } catch (Exception ex) { sLog.Debug("tcp_server", "init tcp server error {1}", ex.Message); } }
public int CompareTo(object obj) { AgentID rhs = (AgentID)obj; return(s.CompareTo(rhs.s)); }
public ExecutorWorker(string name) { this.mName = name; this.agentID = AgentID.Gen(); }