Corona sdk blocking Lua Socket UDP send method

I was following Tutorial: Local multiplayer with UDP/TCP (https://coronalabs.com/blog/2014/09/23/tutorial-local-multiplayer-with-udptcp/)

I created a simple messaging app with socket UDP methods a while back(last year or so)however when i tested the program again using the latest 2017.3184 build, I was not able to use the udp’s sendto method. 

local result,err = sendUDP:sendto( msg, "255.255.255.255", 11111 ) sendUDP:setoption( "broadcast", false ) --turn off broadcast print("sending result: "..tostring(result).." "..tostring(err))

outputs: 

Jul 09 02:55:06.740 sending result: nil refused Jul 09 02:55:06.851 sending result: nil refused

Did some digging on lua webpage(https://rawgit.com/diegonehab/luasocket/master/doc/udp.html) and it says: 

“Note: In UDP, the send method never blocks and the only way it can fail is if the underlying transport layer refuses to send a message to the specified address (i.e. no interface accepts the address).”

Is corona sdk blocking out going messages to unconnected ip address? 

Any chance this issue was solved?

We’ve just had to update one of our apps and UDP behavior seems to have changed as described.

That’s a pretty old tutorial. It’s pre IPv6. Since that tutorial was written, we’ve updated the socket IO library to be IPv6 compliant and there are realistic chances that something changed in that library that changes how UDP behaves. Corona isn’t blocking anything, but LuaSockets might be.

Rob

About a year ago I used that same tutorial and tried to replace the UDP portion of that code with the zeroconf plugin. I did some limited testing and it worked fine, but I have yet to use it in any of my games (at this point there are better options). You can find all the code here. If I remember correctly I tried to keep all the calls exactly the same (all the tcp calls are exactly the same code) so it might be an easy replacement. If you run into any issues let me know and I’ll see what I can do.

https://github.com/agramonte/zcrmmp/tree/master/zeroconf_mp

As a side note: Originally I thought Rob wrote the original code and named the entire library after him. Since then I replaced all the files that had his name.

Any chance this issue was solved?

We’ve just had to update one of our apps and UDP behavior seems to have changed as described.

That’s a pretty old tutorial. It’s pre IPv6. Since that tutorial was written, we’ve updated the socket IO library to be IPv6 compliant and there are realistic chances that something changed in that library that changes how UDP behaves. Corona isn’t blocking anything, but LuaSockets might be.

Rob

About a year ago I used that same tutorial and tried to replace the UDP portion of that code with the zeroconf plugin. I did some limited testing and it worked fine, but I have yet to use it in any of my games (at this point there are better options). You can find all the code here. If I remember correctly I tried to keep all the calls exactly the same (all the tcp calls are exactly the same code) so it might be an easy replacement. If you run into any issues let me know and I’ll see what I can do.

https://github.com/agramonte/zcrmmp/tree/master/zeroconf_mp

As a side note: Originally I thought Rob wrote the original code and named the entire library after him. Since then I replaced all the files that had his name.