This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi, I have a simple chat application using JSSE. I will demonstrate it in class at school. How can I use an Ip address, rather than a host name ? thank you, rodge
SCJP, SCWCD
Jon Dornback
Ranch Hand
Joined: Apr 24, 2002
Posts: 137
posted
0
what exactly do you mean? if you are talking about using an ip instead of a hostname for the Socket constructor, then just use a String of the ip instead of the host. eg: Socket s = new Socket("127.0.0.1",4545); //works the same as: Socket s = new Socket("localhost",4545); is that what you're asking?
use the [CODE] tags - it makes it much easier for people to help you.