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: Problems With Client/Server Operations

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    182
    My Mood
    Where
    Thanks
    15
    Thanked 8 Times in 8 Posts

    Default Problems With Client/Server Operations

    Would it be possible to program an application to be able to setup a client/server connection between to instances of the same app without port forwarding?

    So, somehow initiate a request from the port so the router will accept the incoming socket request from the client end of the app?

    And, to conserve thread space, I am unable to connect to my client/server app externally WITH port forwarding and all firewalls turned off (using external IP).

    It's a basic server.accept() block method and new socket(ip,port) setup (I wont waste time showing the actual code). Are there any other factors I should check?

    Note: The server is instantiated with the constructor:
    server = new ServerSocket(port);
    client = server.accept();


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Problems With Client/Server Operations

    client/server connection between to instances of the same app
    Not familiar with port forwarding.
    Google gave me:
    Port Forwarding simply tells the router which computer on the local area network to send the data to.

    What are you trying to do? Where are the two programs that you want to connect to each other?
    This sounds like where local host(127.0.0.1) is used for testing client/server apps on one pc.

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    182
    My Mood
    Where
    Thanks
    15
    Thanked 8 Times in 8 Posts

    Default Re: Problems With Client/Server Operations

    Quote Originally Posted by Norm View Post
    Not familiar with port forwarding.
    Google gave me:
    Port Forwarding simply tells the router which computer on the local area network to send the data to.

    What are you trying to do? Where are the two programs that you want to connect to each other?
    This sounds like where local host(127.0.0.1) is used for testing client/server apps on one pc.
    Have the application open on two machines running on separate networks and be able to connect to each other through client/host sockets.

    Port Forwarding sends incoming information through a network port to that particular machine. Without it, the router will block incoming requests by default.

Similar Threads

  1. server client upercase
    By Hokorippoi in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 27th, 2011, 04:45 PM
  2. TCP/IP java client, c++ server
    By akboyd88 in forum Java Networking
    Replies: 0
    Last Post: March 24th, 2011, 10:46 AM
  3. simple ftp server and ftp client
    By simontkk2005 in forum Java Networking
    Replies: 4
    Last Post: January 26th, 2011, 10:29 AM
  4. Client/Server
    By Dillz in forum Paid Java Projects
    Replies: 2
    Last Post: June 2nd, 2010, 05:19 AM
  5. Problems with client/server application
    By lori in forum AWT / Java Swing
    Replies: 3
    Last Post: January 15th, 2010, 01:12 PM