Exemple #1
0
 private void ConnectHandler(LNReq_Connect msg, PBChannel channel, int handle, uint seq)
 {
     if (!Enable)
     {
         LogSys.Log(LOG_TYPE.ERROR, "Connect to DataStorNode while DataOperator is Disable");
         return;
     }
     try
     {
         bool   ret      = true;
         string errorMsg = string.Empty;
         LogSys.Log(LOG_TYPE.INFO, "DataStoreClient connect :{0} ", msg.ClientName);
         var reply = NLRep_Connect.CreateBuilder();
         reply.SetResult(ret);
         reply.SetError(errorMsg);
         channel.Send(reply.Build());
     }
     catch (Exception e)
     {
         var reply = NLRep_Connect.CreateBuilder();
         reply.SetResult(false);
         reply.SetError(e.Message);
         channel.Send(reply.Build());
     }
 }
Exemple #2
0
 private void ConnectHandler(LNReq_Connect msg, PBChannel channel, int handle, uint seq)
 {
     try {
         bool   ret      = true;
         string errorMsg = string.Empty;
         LogSys.Log(LOG_TYPE.INFO, "GMServerClient connect :{0} ", msg.ClientName);
         var reply = NLRep_Connect.CreateBuilder();
         reply.SetResult(ret);
         reply.SetError(errorMsg);
         channel.Send(reply.Build());
     } catch (Exception e) {
         var reply = NLRep_Connect.CreateBuilder();
         reply.SetResult(false);
         reply.SetError(e.Message);
         channel.Send(reply.Build());
     }
 }