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 2 of 2

Thread: Java sockets help

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java sockets help

    I want to code a reverse connection and a little client connector.

    I basicaly want a server where clients connect via a reverse connection to different sockets.

    So client1 connects to socket 1

    Client 2 connects to socket 2

    This is done through a ip address on my local network and port.

    Thank you i would appreciate it if someone could point me in the right direction


  2. #2
    Junior Member
    Join Date
    Mar 2010
    Location
    Home-Ujjain /Job-Mumbai
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java sockets help

    Hi Dear, Try this
    Bind your server on a particular MainPort say 5000,
    now the client will request on this port and in the response client will get a new port say 5001-Here you will have to do two things
    first-create a new server thread and bind it on 5001
    second-return the port 5001 so that client will now request for service on 5001

    Remember one thing here first request from the client is for PORT on on which you will bind a new socket
    and second request will be for Servicing the problem
    Programmer

Similar Threads

  1. Replies: 1
    Last Post: March 23rd, 2010, 02:29 AM
  2. Replies: 1
    Last Post: December 2nd, 2009, 04:01 AM
  3. Replies: 1
    Last Post: October 20th, 2009, 06:31 AM