• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about IP

 
David George
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should i allow the user to specify the IP address for server or use InetAddress to get the IP of server?
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,

in my unserstanding it's not a question of using InetAddress or not. correct me if i'm wrong, but i would say that there is no way to find out the ip address of the server (well, you can try out all ;-) )

so you have to have an option to enter an id-adress. (property files are forbidden for basic configuration.)

i implemented a little gui to enter the ip adress. i'm then constructing an InetAddress object out of it, first reason is for input verification, second reason is for type-safe communication between user-gui and data connector.

works pretty good so far ;-)

greets,
jan
 
David George
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe i had a wrong expression . I meant that if allow the server to config the IP in suncertify.property by InetAddress . Or when start the server , allow to enter the server's IP through the server' gui.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, i see....

well, it's a three-liner to find out the current ip, and it's way more comfortable for the user.

i'm reading out the ip & display it in the server gui, which has start & stop buttons & a filechooser.

greetings,
jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic