Results 1 to 2 of 2
  1. #1
    Omarero is offline Member
    Join Date
    Oct 2008
    Rep Power

    Default in server client remote how to kno the ip of the sender

    i created a connection between two computers by constructing a socket with the ip of the target computer and the port like this

    on the computer who issues the request
    echoSocket = new Socket("", 7);

    on the computer who recieves the request
    clientSocket = serverSocket.accept();

    and it had worked and both computers can listen to the same socket, now i want to know on the computer who recieves the request the ip of the sender ?

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Rep Power


    On the Socket object the server gets after calling accept() there is a method getRemoteSocketAddress()

Similar Threads

  1. How to create remote client to connect with MS Access?
    By Constance in forum New To Java
    Replies: 9
    Last Post: 10-19-2012, 05:16 AM
  2. Remote SQL Server Connection
    By saso1310 in forum JDBC
    Replies: 2
    Last Post: 05-15-2009, 08:39 AM
  3. connecting to remote SQL server
    By mahasarathi in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 04-04-2009, 07:11 AM
  4. Replies: 1
    Last Post: 10-05-2008, 04:12 PM
  5. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 10: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