Bug? UDPSocket port not correctly set

demarcky

New Member
Licensed User
Longtime User
When you initialize an UDP port, e.g. through the command UDPSocket1.Initialize("UDP", 5000, 8192) it works correctly but only over WiFi (LAN?).

With the above example, messages that are received on the other end indeed come from port 5000 and replying to port 5000 works as it should. However, once you disable WiFi on you phone and you're connected to the internet through 3G, the sending port is apparently chosen random. Messages arrive on the other end and replying to that port works ok, but they do not come from the port that was set in the Initialize command. Checking UDPSocket1.port just before sending data still gives port "5000" as if it is initialized correctly, so the port number somehow gets overruled....
 

billzhan

Active Member
Licensed User
Longtime User
Please find discussion here: link
I've tried UDP,but doesn't work.I have 2 devices,they don't support UPD.
 

demarcky

New Member
Licensed User
Longtime User
This is not a bug. It is a network issue related to the mobile network.
Euhm kej Erel, thx for the update, but can you elaborate? Is it normal for mobile networks to change ports than? My experience with GPRS is that ports do not change. I don't know about 3G...
 
Top