简体   繁体   English

从Android上的系统udp服务器接收udp数据?

[英]Receive udp data from the system udp server on android?

嗨,我是android的新手。我需要知道如何在android emulator中接收udp数据。数据来自PC(UDP SERVER正在PC上运行)。我正在使用Eclipse IDE。任何人都可以指导我解决这个问题?

You will need to set up redirects since the emulator sits behind a virtual router. 由于仿真器位于虚拟路由器后面,因此您将需要设置重定向

Start the emulator, connect to it via telnet, then give it routing commands; 启动仿真器,通过telnet连接到它,然后给它路由命令;

telnet localhost 5554 
redir add udp:<host-port>:<guest-port>

You will need to this each time you restart the eumlator, so it might be worthwhile to script it. 每次重新启动枚举器时都需要这样做,因此编写脚本可能是值得的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM