Reputation: 243
EMI/UCP is a protocol to communicate to SMS gateways.
I am confused how should I do in respect to network connection.
Do you open a socket for each logic bundle of data (and close it of course), or do you re-use the same socket?
How do you handle out-of-sequence responses in both cases?
My use case is send a couple of SMS with status request (submit short message), each will generate a traffic of 4 messages (a 51 operation and its ack and a 53 operation from the gateway plus the 53 ack).
If I open two sockets, may I be confident each dialog is performed on the some socket or is it a false assumption?
If I use a single socket, how I distinguish the messages from the two conversations? From the OaDC (originator address) only?
Upvotes: 1
Views: 214
Reputation: 126
Answering the last question: you have to match the time stamp in the Ucp51 response message (ACK). It is the field: SCTS.
The correlation id is the couple SCTS and ADC (address caller: it is the recipient cell phone).
Upvotes: 1