Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

UDP Server / Client communication (not locally)
Started by eliasweibert May 16 2019 08:23 AM

1 reply to this topic
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 5 posts
  • Corona SDK

Short: I want to know how to set up my PC / phone as a udp or tcp server (not only locally).
I could make it work locally over the wifi a least, and I dont get what I need to do to make it (I dont even know what to call it:) "not locally".
Though I would appreciate some working code which I could copy/paste or look into, I am more looking for a (beginners) tutorial on networking, internet connections, IP / Port, etc etc. I really have zero knowledge about that all.
Also: I couldnt find any good udp/tcp documentation/tutorial, so a link would be awesome :P
I searched the web for it but I dont really know where to start, or at least I couldnt make any sense of what I found so far.
The only thing I managed to find was that the server needs a static IP address for the client to connect, which I tried (I used my IP address and "12345" port but it still only worked locally).
Any help is appreciated,
thanks in advance!

[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 1,174 posts
  • Corona SDK

I have something I clobbered together a while ago that is on github that will give you a start. I currently use it for one of my game. I have updates on my local machine that I will push up soon. It is not perfect but it should give you a start. I use zeroconf for discovery and then use that for the connection.