IP adresses

47 views
Skip to first unread message

Ali Asif

unread,
Oct 2, 2019, 2:45:58 AM10/2/19
to kryonet-users
I am making a game where a user(client) will be a host of the server and only one other user(client) can connect to him and play with him(likewise there might be multiple servers and pair of clients playing with each other like miniclip games) but how will the other client locate use-host (or servers) IP? i am using kryonet Please Help

Joachim Durchholz

unread,
Oct 2, 2019, 3:50:59 AM10/2/19
to kryone...@googlegroups.com
Am 02.10.19 um 08:45 schrieb Ali Asif:
Kryonet is not about this kind of issue, it is merely a protocol that
you can use if you already have a connection.

Connecting between machines which both may be living behind a firewall
that does Network Address Translation (NAT), without some central
infrastructure, is indeed a challenge. Your best option is to read up on
these.
Or maybe you can just set up your game to run within a LAN as a first
step, and deal with the full connectivity later.

Ali Asif

unread,
Oct 2, 2019, 6:20:46 AM10/2/19
to kryonet-users
Maybe you are right I should be dealing within LAN, but i am really keen to learn.
Some guy told me about NAT punch and STUN, like you are telling but i just dont know what it is.
Can you please tell me most basic sources that i should be reading to head towards what i wish to implement.
Because as you know multiplayer isnt fun at all if its only within LAN.

Thank you for replying and please guide me.

Joachim Durchholz

unread,
Oct 2, 2019, 7:43:07 AM10/2/19
to kryone...@googlegroups.com
Am 02.10.19 um 12:20 schrieb Ali Asif:
> Maybe you are right I should be dealing within LAN, but i am really keen
> to learn.

Getting a LAN game to work is going to be enough of a learning
experience, believe me.
LAN can be a lot of fun. Rise of Nations was VERY fun, and you don't
have to deal with individual players dropping out due to lag, and
similar stuff.

> Some guy told me about NAT punch and STUN, like you are telling but i
> just dont know what it is.
> Can you please tell me most basic sources that i should be reading to
> head towards what i wish to implement.

Unfortunately, I don't know any specifics. I am drawing from experience
that's a few years old, and there were no readymade libraries for NAT
punching etc. at the time.

Regards,
Jo

P.S. I am not going to respond to list messages in this thread anymore,
it's just off-topic.

Ali Asif

unread,
Oct 2, 2019, 8:13:49 AM10/2/19
to kryonet-users
Sure i will go for LAN then i guess.
Thank you brother :).

But just clear one doubt about mine.
What if lets say I know the public address of an android (which is connected to internet with its mobile data so no NAT or firewall)
if it hosts a server..can i connect to it just by typing its address?
Thats my last question..
Thank you.
Reply all
Reply to author
Forward
0 new messages