Results 1 to 6 of 6
  1. #1
    rakeshmalik91 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Find Server IP from Client

    I am creating a client-server application using rmi.
    But every time i connect to server from client i have to enter server IP. How can i find where server is running.
    Server is running on another PC on wifi.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,579
    Rep Power
    23

    Default Re: Find Server IP from Client

    There are commands you can execute on the server that will tell you its IP address. Then pass that address to the client to use.
    Does the server get a new IP address every time it executes?

    In general you have to know a server's IP address to be able to use it. Sort of like a telephone number.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    rakeshmalik91 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Re: Find Server IP from Client

    But server also does not know client ip... do i have to broadcast it somehow(how i dont know)

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,579
    Rep Power
    23

    Default Re: Find Server IP from Client

    Do you have a website that the client can reach? Post the server's IP address there. The client can read the IP address from the website and use it to get to the server.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    rakeshmalik91 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Re: Find Server IP from Client

    No, they are running just connected on Wifi

  6. #6
    rakeshmalik91 is offline Member
    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0

    Default Re: Find Server IP from Client

    cant it be somehow done?
    when client run it broadcasts
    then server sends him its ip to help him connect.
    ....

Similar Threads

  1. Replies: 3
    Last Post: 06-03-2012, 09:48 AM
  2. Replies: 1
    Last Post: 06-03-2012, 03:07 AM
  3. Replies: 2
    Last Post: 09-24-2010, 11:31 AM
  4. Replies: 1
    Last Post: 10-05-2008, 03:12 PM
  5. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 09:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •