Пример #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();
 }
Пример #2
0
 public CmppClient(
     CmppClientConfig config,
     BaseCmppSmsHandler smsHandler) : this(config, smsHandler, new ClientLoggerFactory(config))
 {
 }