JGN get ip?

How to get ip in JGN?

JGN is a dead project, i'd not bother with it.



The current king of java games networking libraries is KryoNet, it'd be better you spent time learning that instead. Its much cleaner and nicer to work with.



http://code.google.com/p/kryonet/

faust said:

JGN is a dead project, i'd not bother with it.

JGN is not dead, there have been some commits just lately and I had contact with one developer.

JGN is definitely not a dead project!

It’s now got working regional sync’ing as well, through a proximity method.

There are also other people working on things and many people using the library.

I find it easy to use and powerful myself.



The JGN forum is here: http://forum.captiveimagination.com/index.php



I’m not quite sure how to get the IP address directly (I’m not sure how you want to get it), as I’ve never had need of it yet, but you can get the SocketAddress of all connected MessageClients and print out the IP address this way:


SocketAddress addr;
for(MessageClient c : server.getReliableServer().getMessageClients()) {
  addr = c.getAddress();
  System.out.println("IP address: "+addr);
}

apologies if it isn't dead, last i spoke to the original author of JGN he told me he was no longer working on it.



btw whats the official JGN site?

faust said:

btw whats the official JGN site?

http://code.google.com/p/jgn/

Thanks Tumaini  :smiley: