Ejemplo n.º 1
0
 public ConnectionWatchdog(Bootstrap bootstrap, CmppClientConfig config, SessionMap sessionMap, ITimer timer, ClientLoggerFactory loggerFactory)
 {
     this.bootstrap     = bootstrap;
     this.timer         = timer;
     this.config        = config;
     this.sessionMap    = sessionMap;
     this.logger        = loggerFactory.CreateLogger <ConnectionWatchdog>();
     this.loggerFactory = loggerFactory;
 }
Ejemplo n.º 2
0
 public CmppConnectHandler(CmppClientConfig config, SessionMap sessionMap, Action connectCallBack_OK, ITimer timer, ClientLoggerFactory loggerFactory)
 {
     this.config             = config;
     this.sessionMap         = sessionMap;
     this.connectCallBack_OK = connectCallBack_OK;
     this.timer         = timer;
     logger             = loggerFactory.CreateLogger <CmppConnectHandler>();
     this.loggerFactory = loggerFactory;
 }
Ejemplo n.º 3
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();
 }
Ejemplo n.º 4
0
 public CmppDeliverHandler(BaseCmppSmsHandler baseSmsHandler, ClientLoggerFactory loggerFactory)
 {
     this.baseSmsHandler = baseSmsHandler;
 }
Ejemplo n.º 5
0
 public Cmpp2Decoder(ClientLoggerFactory loggerFactory, ByteOrder byteOrder, int maxFrameLength, int lengthFieldOffset, int lengthFieldLength, int lengthAdjustment, int initialBytesToStrip, bool failFast) : base(byteOrder, maxFrameLength, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip, failFast)
 {
     this.logger = loggerFactory.CreateLogger <Cmpp2Decoder>();
 }
Ejemplo n.º 6
0
 public Cmpp2Decoder(ClientLoggerFactory loggerFactory, int maxFrameLength, int lengthFieldOffset, int lengthFieldLength, int lengthAdjustment, int initialBytesToStrip) : base(maxFrameLength, lengthFieldOffset, lengthFieldLength, lengthAdjustment, initialBytesToStrip)
 {
     this.logger = loggerFactory.CreateLogger <Cmpp2Decoder>();
 }
Ejemplo n.º 7
0
 public Cmpp2Decoder(ClientLoggerFactory loggerFactory, int maxFrameLength, int lengthFieldOffset, int lengthFieldLength) : base(maxFrameLength, lengthFieldOffset, lengthFieldLength)
 {
     this.logger = loggerFactory.CreateLogger <Cmpp2Decoder>();
 }
Ejemplo n.º 8
0
 public CmppSubmitRespHandler(BaseCmppSmsHandler smsHandler, SubmitSmsMatchPool <MsgEx> matchQueue, ClientLoggerFactory loggerFactory)
 {
     this.matchQueue = matchQueue;
     this.smsHandler = smsHandler;
     logger          = loggerFactory.CreateLogger <CmppSubmitRespHandler>();
 }
Ejemplo n.º 9
0
 public CmppSmsHandler(ClientLoggerFactory loggerFactory)
 {
     logger = loggerFactory.CreateLogger <CmppSmsHandler>();
 }
Ejemplo n.º 10
0
 public ConnectCloseHandler(SessionMap sessionMap, Action connctCloseCallBack, ClientLoggerFactory loggerFactory)
 {
     logger                   = loggerFactory.CreateLogger <ConnectCloseHandler>();
     this.sessionMap          = sessionMap;
     this.connctCloseCallBack = connctCloseCallBack;
 }
Ejemplo n.º 11
0
 public ActiveIdleStateTrigger(ClientLoggerFactory loggerFactory)
 {
     logger = loggerFactory.CreateLogger <ActiveIdleStateTrigger>();
 }
Ejemplo n.º 12
0
 public Cmpp2Encoder(ClientLoggerFactory loggerFactory)
 {
     logger = loggerFactory.CreateLogger <Cmpp2Encoder>();
 }
Ejemplo n.º 13
0
 public Session(ClientLoggerFactory loggerFactory)
 {
     logger = loggerFactory.CreateLogger <Session>();
 }