private void SendActiveTest(IChannelHandlerContext context) { IMessage message = new CmppActiveTest(); CmppTools.GroupPacket(message); SmsPacket connect = CmppTools.GroupPacket(message); CmppTools.SendAsync(context, connect); }
private SmsPacket GetConnectRequestPacket(ulong msgId, uint seq) { var date = DateTime.Now; IMessage message = new CmppDeliverResp() { MsgId = msgId, Result = 0 }; return(CmppTools.GroupPacket(message, seq)); }
private SmsPacket GetConnectRequestPacket(string userName, string password) { var date = DateTime.Now; authenticatorSource = CmppTools.CreateAuthenticatorSource(date, userName, password); IMessage message = new CmppConnect() { TimeStamp = uint.Parse(string.Format("{0:MMddHHmmss}", date)), AuthenticatorSource = authenticatorSource, Version = CmppConstants.Version, SourceAddress = userName, }; return(CmppTools.GroupPacket(message)); }
private SmsPacket GetActiveRespPacket(CmppHead head) { IMessage message = new CmppActiveTestResp(); return(CmppTools.GroupPacket(message, head.SequenceId)); }