DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Networking

  1. #1
    Join Date
    Sep 2005


    I have some experience using the Socket class and ServerSocket class in the java.net package.

    However, I want to be able to connect to my Server using a domain name instead of having to know the IP of the server.
    Right now of course I just tell my client to connect to but I'd like to be able to have clients connect to the server without having to know my exact IP. Using a domain name or my computer name?

    Anyone have ideas?
    Also, when creating a chat program using the aforementioned classes, if your server recieves multiple requests from various clients would you create a separate socket for each client to talk to the server or could you use threads to let multiple clients use one socket, one port?

    The help is very much appreciated.

  2. #2
    Join Date
    Jul 2005
    SW MO, USA
    A question: how do you have a server that doesn't have a domain name?
    If your client connects to your server via: localhost ie they are NOT on the internet, they are purely local. Could you explain this?
    Or is your server a personal one that you run on your computer which connects to the net via dialup and gets a unique IP address every time you connect?
    There are IP lookup routines that will look in the DNS tables and return the domain address for an IP address. Try google.

  3. #3
    Join Date
    Sep 2005
    Ok I phrased my question poorly.

    1) I want to create a server program in Java
    2) have clients connect to that server

    What are the options available for them to connect if the server program is running on my computer?
    Must they know my IP or is it possible they can use my computer name or something of the like?

  4. #4
    Join Date
    Jul 2005
    SW MO, USA
    What kind of connection do you have with the internet? Do you have the same IP address everytime or does it change like with dial-up connections?
    If its constant, there might be a "domain-name" associated with it.

    I use the following site to translate IP addresses to "domain/text" addresses:

    Otherwise your users would type in something like:
    which may be shorter than the IP address

    If you get a new IP address everytime, that makes it harder. One way to fiddle it would be to get a fixed site that you can place some HTML page on. Have that page do a redirect to your current site. You would have to update it every time that you connected with a new IP address so it would redirect to your new address.

Similar Threads

  1. Replies: 15
    Last Post: 07-31-2002, 10:56 AM
  2. a switch to Networking industry
    By Jim in forum Careers
    Replies: 1
    Last Post: 10-12-2000, 04:35 PM
  3. Dial Up Networking
    By Paul Clapham in forum VB Classic
    Replies: 6
    Last Post: 06-20-2000, 02:15 PM
  4. Dial Up Networking
    By Paul Clapham in forum VB Classic
    Replies: 0
    Last Post: 06-19-2000, 06:20 PM
  5. dialup networking
    By Trevor in forum VB Classic
    Replies: 0
    Last Post: 03-16-2000, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.