how to get Client Ip address?

M

Muneeb kiani

I want to know that how can we know the IP address of client on server
side in socket (java). Suppose there is a server "S" and 2 clients "A"
and "B". Client A send me(server) some info, and Client B send
me(server) some other info. I have to store that info coming from A
and B in database in different tables. How can I Differentiate between
client A and B request.?
 
F

faxserverplus

I want to know that how can we know the IP address of client on server
side in socket (java). Suppose there is a server "S" and 2 clients "A"
and "B". Client A send me(server) some info, and Client B send
me(server) some other info. I have to store that info coming from A
and B in database in different tables. How can I Differentiate between
client A and B request.?

csocket.getRemoteSocketAddress().toString();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top