Networking


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Networking

  1. #1
    Join Date
    Sep 2005
    Location
    TX
    Posts
    23

    Networking

    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 127.0.0.1 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
    Location
    SW MO, USA
    Posts
    299
    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 127.0.0.1 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
    Location
    TX
    Posts
    23
    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
    Location
    SW MO, USA
    Posts
    299
    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:
    http://www.zoneedit.com/lookup.html

    Otherwise your users would type in something like: http://164.34.234.25
    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, 11:56 AM
  2. a switch to Networking industry
    By Jim in forum Careers
    Replies: 1
    Last Post: 10-12-2000, 05:35 PM
  3. Dial Up Networking
    By Paul Clapham in forum VB Classic
    Replies: 6
    Last Post: 06-20-2000, 03:15 PM
  4. Dial Up Networking
    By Paul Clapham in forum VB Classic
    Replies: 0
    Last Post: 06-19-2000, 07:20 PM
  5. dialup networking
    By Trevor in forum VB Classic
    Replies: 0
    Last Post: 03-16-2000, 03: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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

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