java - 将响应与 Logica SMPP 异步模式中的请求相关联

标签 java smpp

我正在尝试使用logica SMPP API 实现SMPP 客户端。

我面临的问题是,如何在异步模式下将请求 pdu 与响应 pdu 映射?我想我可以使用 CommandId 和序列号来做到这一点。但logica模拟器返回的CommandId与请求的CommandId不相等。

示例:

Enquire Link Comman ID (Request) = 21
Enquire Link Comman ID (async response from simulator) = -2147483627

请告诉我如何在异步模式下将请求事件与响应事件映射。

最佳答案

查看protocol definition PDF从第16页的表6.1中,您可以发现用于关联的字段不是CommandID(定义请求类型),而是Sequence No

来自文档:

A sequence number allowing requests and responses to be associated. Allocation of this reference number is the responsibility of the originator, who should ensure that the number is monotonically increasing for each submitted request. The associated response packet must preserve this field.

关于java - 将响应与 Logica SMPP 异步模式中的请求相关联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12684968/

相关文章:

gsm:手机用什么协议(protocol)给smsc发短信?

java - Spring 安全 - 自定义 ExceptionTranslationFilter

java - 重写 JacksonJsonProvider.writeTo 时,我可以指定用于序列化的 View 吗?

java - spring boot 中的自定义 jpa 验证

c# - SMPP 绑定(bind)错误 : 0x0000000D in EasySMPP

bind - SMPP中绑定(bind)收发请求地址范围参数是什么意思

networking - 消息中心号码、SMSC、ESME、SMPP

java - 为什么从 Oracle 查询符合 JDBC 的数据库没有那么简单?

java - 从 Swing 应用程序创建 Web 应用程序

java - SMPP模拟器和SMPP服务器之间的区别