Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26
  1. #21
    EvilMonkey is offline Member
    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Default Re: Connection between 2 clients

    Yes. I have made appA as socketserver and appB as client and A creates a serversocket and B a client socket (new Socket("127.0.0.1", 5000);)
    The server that you talked about should be on the internet so that I will be sure it will be available when my project will be tested. I can't create the server on my laptop because I will be needing it.

  2. #22
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default Re: Connection between 2 clients

    For two PCs on the internet to communicate using sockets, one of them will need the IP address of the other.
    How can one get the other's IP address? For testing you could use a phone to pass the IP address.

  3. #23
    EvilMonkey is offline Member
    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Default Re: Connection between 2 clients

    Quote Originally Posted by Norm View Post
    For two PCs on the internet to communicate using sockets, one of them will need the IP address of the other.
    How can one get the other's IP address?
    This is actually why I made this thread :D
    For testing you could use a phone to pass the IP address.
    I have never even heard of such a thing :) is it simple?

    Isn't there an easier way? I have some experience with html, php, javascript, can't I do something with those?

    Edit: or did you mean to just call the other person and tell him my IP?

  4. #24
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default Re: Connection between 2 clients

    just call the other person and tell him your IP

  5. #25
    EvilMonkey is offline Member
    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Default Re: Connection between 2 clients

    Yes, but I don't think my teacher will agree with this :) I will test it later with someone, but I need a method without human contribution.

  6. #26
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,518
    Rep Power
    25

    Default Re: Connection between 2 clients

    That's what was talked about in posts 2 and 6. You need a server at a known address that your PCs can register their IP addresses with and get other PCs address from.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Server/clients connection periodically
    By akis3110 in forum New To Java
    Replies: 4
    Last Post: 06-28-2011, 03:03 PM
  2. communication between clients UDP
    By maribo in forum Networking
    Replies: 1
    Last Post: 06-16-2010, 01:17 PM
  3. ip address of all clients
    By guneet singh in forum Networking
    Replies: 4
    Last Post: 03-01-2009, 02:01 PM
  4. Replies: 4
    Last Post: 02-02-2009, 04:05 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
  •