private void PduRequestProcessorCallback(RequestPDU pdu)
        {
            ResponsePDU resp = null;

            if (pdu is Unbind)
            {
                resp = pdu.CreateDefaultResponce();
                try { SendPduBase(resp); }
                catch { /*silent catch*/ }
                EndSession(SmppSessionCloseReason.UnbindRequested, null);
                return;
            }
            resp = RaisePduReceivedEvent(pdu);
            if (resp == null)
            {
                if (pdu.HasResponse)
                {
                    resp = pdu.CreateDefaultResponce();
                }
            }
            if (resp != null)
            {
                try { SendPduBase(resp); } catch { /*Silent catch*/ }
            }
        }
        private void PduErrorEventHandler(object sender, PDUErrorEventArgs e)
        {
            ResponsePDU resp = null;

            if (e.Pdu is RequestPDU)
            {
                RequestPDU req = (RequestPDU)e.Pdu;
                resp = req.CreateDefaultResponce();
                resp.Header.ErrorCode = e.Exception.ErrorCode;
            }
            else
            {
                resp = new GenericNack(e.Header);
                resp.Header.ErrorCode = e.Exception.ErrorCode;
            }
            try { SendPduBase(resp); }
            catch { /*silent catch*/ }
        }