简体   繁体   中英

Receive only a handful of UDP packets after a redir. (Android Emulator)

I wrote a desktop java program to talk to the server I'm trying to reach and got it working. I can send and receive UDP packets. I know what to port what I've done to android. I've been messing around with the Android Emulator for a couple days and ran into an issue with receiving UDP packets. If I start my app, make the connection to the server, then redir the port I'm using, I get ~130 packets that come in and then nothing ... I used WireShark to make sure the server was still sending packets and it is. Is there something like IP Flood Detection on the Android's Emulator?

EDIT:

spelling

  • The server is connected to a switch that my dev computer is connected to.
  • The server is responding to my packets that I send from the desktop app.
  • The server is sending the packets to the dev comupters IP address.
  • The redir command I'm using is "redir add udp:port:port"

  • When I issue the redir command, I get the ~130 packets with a from address of "10.0.2.2"

  • I've tried "adb forward udp:port udp:port" and get "cannot bind to socket"
  • The server's IP from outside the emulator is "10.10.0.100"

EDIT

  • The server is not on the emulator or another android device

I did a test with similar setup and got the same behaviour.

Sending a UDP packet per second after aprox. 130 packets the receiver running in the emulator stop receiving packets, and I confirm that the packets kept being sent.

I've made the test above in emulator using SDK 10 and SDK 15, both running in Intel Accelerated Execution Manager.

It looks like a bug in the emulator redirection functionality, or as you suggest, some type of network flood prevention.

I bought a Nexus 7, ran this app I've been working on and can receive 3000+ packets. Looks like its something with the emulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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