send dlr receipt to client

Post Reply
htinnyo
Posts: 12
Joined: Mon Feb 03, 2020 3:41 pm

send dlr receipt to client

Post by htinnyo » Wed Apr 22, 2020 11:16 pm

Hello,
I am sending Delivery receipt using the following

Code: Select all

 DeliverSmResp[] response = await serverClient.DeliverAsync(
                        SMS.ForDeliver()
                            .From(systemid)
                            .To(destination)
                            .Receipt(new Receipt
                            {
                                DoneDate = DateTime.Now,
                                State = dlr,
                                MessageId = req.clientMessageId,
                                ErrorCode = "0",
                                SubmitDate = DateTime.Now
                            }
                            )
                    )
                    .ConfigureAwait(false);
is there any timeout error? what can i do properly if the server failed to connect the client.

Thanks
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: send dlr receipt to client

Post by alt » Thu Apr 23, 2020 8:59 am

serverClient.ResponseTimeout defines how long library is waiting for response PDU.

In case of timeout you should receive DeliverSmResp.Header.Status == SMPPCLIENT_RCVTIMEOUT.
When client disconnects you should get status SMPPCLIENT_NOCONN.

In this case you need to resend DeliverSm PDU when client connects again to your server.
Post Reply