Esempio n. 1
0
        /// <summary>
        /// Unbinds the SMPPCommunicator from the SMSC then disconnects the socket
        /// when it receives the unbind response from the SMSC.  This will also stop the
        /// timer that sends out the enquire_link packets if it has been enabled.  You need to
        /// explicitly call this to unbind.; it will not be done for you.
        /// </summary>
        public void Unbind()
        {
            if (timer != null)
            {
                timer.Stop();
            }

            if (!_SentUnbindPacket)
            {
                SmppUnbind request = new SmppUnbind();
                SendPdu(request);
                _SentUnbindPacket = true;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Unbinds the SMPPCommunicator from the SMSC then disconnects the socket
        /// when it receives the unbind response from the SMSC.  This will also stop the
        /// timer that sends out the enquire_link packets if it has been enabled.  You need to
        /// explicitly call this to unbind.; it will not be done for you.
        /// </summary>
        public void Unbind()
        {
            if (timer != null)
            {
                timer.Stop();
            }

            if (!_SentUnbindPacket && IsBinded)
            {
                SmppUnbind request = new SmppUnbind();
                SendPdu(request);
                _SentUnbindPacket = true;
            }
            asClient.Dispose();
            asClient  = null;
            _isBinded = false;
        }
 /// <summary>
 /// Sets up the UnbindEventArgs.
 /// </summary>
 /// <param name="response">The SmppUnbind.</param>
 internal UnbindEventArgs(SmppUnbind response) : base(response)
 {
     _response = response;
 }