Ejemplo n.º 1
0
        //与DataCache建立连接
        private void ConnectDataStore()
        {
            Msg_LD_Connect connectMsg = new Msg_LD_Connect();

            connectMsg.ClientName = "UserSvr";
            if (m_DataStoreChannel.Send(connectMsg))
            {
                m_CurrentStatus = ConnectStatus.Connecting;
            }
        }
Ejemplo n.º 2
0
 private void DSConnectHandler(Msg_LD_Connect msg, PBChannel channel, int handle, uint seq)
 {
     try {
         LogSys.Log(LOG_TYPE.INFO, "DataStoreClient connect :{0} ", msg.ClientName);
         var reply = new Msg_DL_Connect();
         reply.Result = true;
         reply.Error  = string.Empty;
         channel.Send(reply);
     } catch (Exception e) {
         var reply = new Msg_DL_Connect();
         reply.Result = false;
         reply.Error  = e.Message;
         channel.Send(reply);
         LogSys.Log(LOG_TYPE.ERROR, "Connect failed. ClientName:{0}", msg.ClientName);
     }
 }