Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP广播的问题 #32

Open
pangxb opened this issue Jan 23, 2019 · 1 comment
Open

UDP广播的问题 #32

pangxb opened this issue Jan 23, 2019 · 1 comment

Comments

@pangxb
Copy link

pangxb commented Jan 23, 2019

Hi,你好,

我们在使用中发现,如果AsyncDatagramConnector的实例对象调用Connect连接了一个广播地址,之后就无法收取不是从这个地址发出的UDP广播数据。我们尝试了Framework自带的UDPClient,发现不做连接,直接广播,收发一切正常。但是MINA的设计架构似乎一定要先有连接拿到ISession才能做通讯,哪怕是UDP...,因为我们整个系统基于.Net Framework4.0开发,而且必须支持XP,所以我们没法选择DotNetty,貌似Netty是不做连接的。计划用MINA.NET来改写之前的通讯模块,但是现在卡壳这里了,TCP工作的很好,但我们设备检测必须要用UDP,而广播检测消息之后,就无法收到设备的回复了。。。不知能否给些建议来解决这个问题?

@longshine
Copy link
Owner

hi~ sorry for the delay.

Connector里有Connect操作可能绑定了地址,可以试试用AsyncDatagramAcceptor来实现收取消息,具体示例请参考:Mina.Example/MulticastUDP/Program.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants