Beispiel #1
0
        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);
        }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
 public ExecutorWorker(string name)
 {
     this.mName   = name;
     this.agentID = AgentID.Gen();
 }