Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Corona sdk blocking Lua Socket UDP send method
Started by info3014 Jul 08 2018 10:58 AM

- - - - -
No replies to this topic
socket udp multiplayer tcp/ip
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 1 posts
  • Corona SDK

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, "", 11111 )
sendUDP:setoption( "broadcast", false )  --turn off broadcast
print("sending result: "..tostring(result).."  "..tostring(err))


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? 






Also tagged with one or more of these keywords: socket, udp, multiplayer, tcp/ip