A Client needs to know who is the caller.
1 posts in topic
Flat View  Flat View

Posted By:   raja_raja
Posted On:   Wednesday, November 5, 2003 09:07 PM

I am developing a client-server socket Program. I will access the client program through some other class, say XXXClass(this class resides on many machine in the Network). Now the Socket Client program acts as the gate way for my XXXClass and the server. Is there any way, that the client should know from which machine the XXXClass has come. We are maintaining a table in which we are writing who is caller of the Client each time.

Thanx in advance for ur answer.


Re: A Client needs to know who is the caller.

Posted By:   Simon_Ablett  
Posted On:   Thursday, November 6, 2003 06:34 AM

You could call getInetAddress on your socket object. This will give you details of the remote connection but it might not correlate to the true address of the originator (for example, if they access through a firewall I think it will return the wall's address although I might be wrong about this). Have a play about with it. You could also use getRemoteSocketAddress.

About | Sitemap | Contact