Hi I am using java for socket programming. To create client socket I have to pass IP and port. But I want to create client socket by passing domain name and port whether its possible.
My domain name refers to a static address internally. means i want to pass http://www.xyz.com instead of ip address.
Thanks
Sunil Kumar Sahoo
Socket has a constructor, which takes a host name:
It will do gethostbyname() resolution for you.