Page 1 of 1

BindRespEventHandler Not fired in version (1.1.21.5)

Posted: Thu Mar 03, 2016 9:05 am
by syam
Dear Support,

This event was working with earlier version(1.0.12.0). but with with new version(1.1.21.5) it is not firing.

Code: Select all


objSMPP.evBindComplete += new Inetlab.SMPP.Common.BindRespEventHandler(client_evBindComplete);

void client_evBindComplete(object sender, Inetlab.SMPP.PDU.BindResp data)
        {
            try
            {
                int index = lstSMSCclientSMPP.IndexOf((SmppClient)sender);
                switch (data.Status)
                {
                    case CommandStatus.ESME_ROK:
                        lstSMPPConfig[index].Binded = true;
                        objLogger.log("Bind result " + index.ToString() + "[ " + lstSMPPConfig[index].ConnectionName + " ] : system is " + data.SystemId + " with status " + data.Status.ToString() + " Sequneceno " + data.Sequence.ToString(), "Connection");

                        ShortCodeAvailable_MT = objNpCustom.GetRouteAvailableforMT(lstSMPPConfig);
                        break;
                    default:
                        lstSMPPConfig[index].Binded = false;
                        objLogger.log("Bad status returned during Bind [ " + lstSMPPConfig[index].ConnectionName + " ]: " + data.Command.ToString() + " with status " + data.Status.ToString(), "Connection");
                        break;
                }
            }
            catch (Exception ex)
            {
                objLogger.log(ex.Message, "Error");
                objLogger.log(ex.ToString(), "Error");
            }
        }


Re: BindRespEventHandler Not fired in version (1.1.21.5)

Posted: Fri Mar 04, 2016 12:12 pm
by alt
Dear syam,

There are two methods to bind with server. Bind and BindAsync.

In asynchronous method BindAsync, BindResp should be received with the event evBindComplete.
In synchronous method Bind you can receive BindResp as return value therefore evBindComplete event is not firing.