UDP Server / Client communication (not locally)

Hello!

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 :stuck_out_tongue:

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!

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.

https://github.com/agramonte/zcrmmp

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.

https://github.com/agramonte/zcrmmp