Results 1 to 2 of 2
  1. #1
    nwboy74 is offline Member
    Join Date
    Oct 2008
    Posts
    45
    Rep Power
    0

    Question [SOLVED] Client/Server between two machines

    I'd like to set up a ServerSocket to listen for connections on a UNIX box A. On UNIX box B, I'd like to set up a Socket to connect to the server that I set up on box A. But I'm not sure how to do that on separate machines. They're both on the same network at work. I can easily have the client connect to the server when they're both on the same machine, but I don't know the SocketAddress to use in the Socket.connect() method when they're on separate machines.

    I tried using InetAddress' static methods to grab the host address, but they both give 127.0.0.1.

  2. #2
    nwboy74 is offline Member
    Join Date
    Oct 2008
    Posts
    45
    Rep Power
    0

    Default

    Okay. I figured it out. I can get the IP with the unix command nslookup.

Similar Threads

  1. client-server app
    By shwein in forum Networking
    Replies: 3
    Last Post: 10-14-2008, 05:20 PM
  2. Replies: 1
    Last Post: 10-05-2008, 03:12 PM
  3. client/server palindrom
    By Rgfirefly24 in forum New To Java
    Replies: 0
    Last Post: 04-28-2008, 02:19 AM
  4. JDK versions on web server and client machines
    By sunjavaboy in forum New To Java
    Replies: 1
    Last Post: 03-21-2008, 04:59 AM
  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
  •