Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Connecting via hamachi to a server

  1. #1
    Member
    Join Date
    Sep 2013
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Connecting via hamachi to a server

    I'm using serversockets for the server and sockets for the client and I'm trying to connect to the server using hamachi. I'm using the right IP, but it won't let me connect and I'm getting a timeout exception.

    Here's my code:

    Server:

    ServerSocket serverSocket = new ServerSocket(port, 4, null);

    Client:

    Socket clientSocket = new Socket(serverIP, port);


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Connecting via hamachi to a server

    DOes the code work when run on a single PC with the localhost address?
    Can there be a problem with a router or firewall?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Sep 2013
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: Connecting via hamachi to a server

    The code works using localhost and even with LAN.

Similar Threads

  1. CONNECTING DATABASE SERVER USING EJB
    By manikantag in forum Web Frameworks
    Replies: 0
    Last Post: April 1st, 2014, 01:24 AM
  2. help in connecting to server
    By bothina in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: February 18th, 2012, 11:40 AM
  3. Connecting to Server Database From Applet
    By aussiemcgr in forum JDBC & Databases
    Replies: 7
    Last Post: December 16th, 2011, 02:46 PM
  4. Replies: 1
    Last Post: June 7th, 2011, 11:53 AM
  5. java application connecting to a server
    By wildheart25c in forum Java Networking
    Replies: 2
    Last Post: September 17th, 2009, 07:22 AM