示例#1
0
        /// <summary> Called when an unbind command is complete </summary>
        /// <param name="sender"></param>
        /// <param name="data"></param>
        private CommandStatus ClientEventUnBindSm(object sender, UnBindSm data)
        {
            if (ConnectionEventHandler != null)
            {
                ConnectionEventHandler(LogKey, ConnectionEventTypes.UnBound, string.Format("ESMEConnection : ClientEventUnBindSm : WARNING : Host[{0}] Port[{1}] Connection UnBound", Host, Port, ConnectionMode, ConnectionId));
            }

            return(CommandStatus.ESME_ROK);
        }
示例#2
0
        /// <summary> Called to create a PduUnBind object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="buf"></param>
        /// <param name="offset"></param>
        /// <returns> PduUnBind </returns>
        public static UnBindSm Create(DataCodings defaultEncoding, SmppBuffer buf, ref int offset)
        {
            UnBindSm unBind = new UnBindSm(defaultEncoding);

            try
            {
                buf.ExtractHeader(unBind, ref offset);
            }

            catch
            {
                unBind = null;
            }

            return unBind;
        }
示例#3
0
        /// <summary> Called to create a PduUnBind object </summary>
        /// <param name="defaultEncoding"></param>
        /// <param name="buf"></param>
        /// <param name="offset"></param>
        /// <returns> PduUnBind </returns>
        public static UnBindSm Create(DataCodings defaultEncoding, SmppBuffer buf, ref int offset)
        {
            UnBindSm unBind = new UnBindSm(defaultEncoding);

            try
            {
                buf.ExtractHeader(unBind, ref offset);
            }

            catch
            {
                unBind = null;
            }

            return(unBind);
        }
示例#4
0
 /// <summary> Called to create a PduUnBindResp object </summary>
 /// <param name="defaultEncoding"></param>
 /// <param name="unBindSm"></param>
 /// <param name="commandStatus"></param>
 /// <returns> PduUnBindResp </returns>
 internal static UnBindSmResp Create(DataCodings defaultEncoding, UnBindSm unBindSm, CommandStatus commandStatus)
 {
     return new UnBindSmResp(defaultEncoding, commandStatus, unBindSm.Sequence);
 }
示例#5
0
 /// <summary> Called to create a PduUnBindResp object </summary>
 /// <param name="defaultEncoding"></param>
 /// <param name="unBindSm"></param>
 /// <param name="commandStatus"></param>
 /// <returns> PduUnBindResp </returns>
 internal static UnBindSmResp Create(DataCodings defaultEncoding, UnBindSm unBindSm, CommandStatus commandStatus)
 {
     return(new UnBindSmResp(defaultEncoding, commandStatus, unBindSm.Sequence));
 }
示例#6
0
        /// <summary> Called when an unbind command is complete </summary>
        /// <param name="sender"></param>
        /// <param name="data"></param>
        private CommandStatus ClientEventUnBindSm(object sender, UnBindSm data)
        {
            if (ConnectionEventHandler != null)
            {
                ConnectionEventHandler(LogKey, ConnectionEventTypes.UnBound, string.Format("ESMEConnection : ClientEventUnBindSm : WARNING : Host[{0}] Port[{1}] Connection UnBound", Host, Port, ConnectionMode, ConnectionId));
            }

            return CommandStatus.ESME_ROK;
        }
示例#7
0
        /// <summary> Called to fire the unbind pdu event </summary>
        /// <param name="data"></param>
        /// <returns> CommandStatus </returns>
        internal CommandStatus OnUnBindSm(UnBindSm data)
        {
            CommandStatus commandStatus = CommandStatus.ESME_RSYSERR;

            try
            {
                if (UnBindSmEvent != null)
                {
                    commandStatus = UnBindSmEvent(this, data);
                }
            }

            catch
            {
            }

            return commandStatus;
        }