按顺序接收多部分短信 [英] recieve multipart sms with sequence

查看:84
本文介绍了按顺序接收多部分短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我收到pdu格式的多段或长短信时,我在C#中遇到了一个新问题..我知道每条长短信都有类似的引用

sms#1
第1部分ref = 00
第2部分ref = 00
第3部分ref = 00

sms#2
第1部分ref = 01
第2部分ref = 01
第3部分ref = 01

问题是当我收到短信时,其序列显示如下

sms#1
第1部分ref = 00

sms#2
第3部分ref = 01

sms#1
第2部分ref = 00
第3部分ref = 00

sms#2
第2部分ref = 01
第1部分ref = 01

请向我解释一下我该如何设置类似sms#1的序列,先接收所有部件,然后再使sms#2接收所有部件...还有更多的事情,大多数情况下,接收sms的参考号= 00如何设置每个传入的sms的参考号是否不同. .

i m new in c# facing a problem when i receive multipart or long sms in pdu format..i knew every long sms have a reference no like

sms#1
part 1 ref=00
part 2 ref=00
part 3 ref=00

sms#2
part 1 ref=01
part 2 ref=01
part 3 ref=01

problem is when i recieve sms its sequence shows like this

sms#1
part 1 ref=00

sms#2
part 3 ref=01

sms#1
part 2 ref=00
part 3 ref=00

sms#2
part 2 ref=01
part 1 ref=01

please explain me how can i set the sequence like sms#1 all parts recieve first then sms#2 recieve all parts...and one more thing most of time recieve sms reference no=00 how to set every incoming sms different reference no..

推荐答案

您不能.

序列号的整体思想是,各部分可以按任何顺序到达,而不必顺序接收.如果可以保证按订单到达
You can''t.

The whole idea of the sequence numbers is that the parts can arrive in any order and do not have to be received sequentially. If they were guaranteed to arrive in the order
(SMS1, P1) 
(SMS1, P2) 
(SMS1, P3) 
(SMS2, P1) 
(SMS2, P2) 
(SMS2, P3) 

那么完全没有序列号和单独的消息ID根本没有意义!
请参见 Wiki [

Then there would be no point at all in having sequence numbers and separate message ids at all!
See Wiki[^] for a description...


这篇关于按顺序接收多部分短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆