Exemple #1
0
 public CmppClient(
     CmppClientConfig config,
     BaseCmppSmsHandler smsHandler,
     ClientLoggerFactory loggerFactory)
 {
     this.loggerFactory  = loggerFactory;
     this.logger         = loggerFactory.CreateLogger <CmppClient>();
     config.ClientStatus = ClientStatus.WAITING_CONNECT;
     config.Version      = CmppVersion.CMPP20;
     Config            = config;
     smsHandler.client = this;
     this.smsHandler   = smsHandler;
     matchQueue        = new SubmitSmsMatchPool <MsgEx>(32, 60 * 1000);
     if (smsHandler != null)
     {
         matchQueue.timeOutHandle = smsHandler.SubmitTimeOutHandle;
     }
     eventExecutorGroup = new MultithreadEventLoopGroup();
     group     = new MultithreadEventLoopGroup();
     dbContext = new SqliteContext(Config.ClientId);
     InitClient();
 }
 public CmppSubmitRespHandler(BaseCmppSmsHandler smsHandler, SubmitSmsMatchPool <MsgEx> matchQueue, ClientLoggerFactory loggerFactory)
 {
     this.matchQueue = matchQueue;
     this.smsHandler = smsHandler;
     logger          = loggerFactory.CreateLogger <CmppSubmitRespHandler>();
 }