Ejemplo n.º 1
0
        private void CallFun(object parm)
        {
            Debug.Log("Severce thread CallFun Beign");
            NetSocket client = parm as NetSocket;

            client.Receive();
        }
Ejemplo n.º 2
0
 public NetProcessor()
 {
     socket = new NetSocket();
     mInLoadingMessageCache      = new InLoadingMessageCache(this);
     socket.OnDisConnectCallBack = OnDisConnectByServer;
     state = ProcessorState.None;
 }
Ejemplo n.º 3
0
 public bool Start(NetSocket socket)
 {
     if (state == ThreadState.None)
     {
         thread = new Thread(new ParameterizedThreadStart(CallFun));
         thread.Start(socket);
         state = ThreadState.Running;
         return(true);
     }
     return(false);
 }