If you know the servers name you can ping the name and it will get you an IP address.
i am developing a chat application in which the first person who runs the application becomes the server.The next person who signs in has to find that server and then connect to it.. Is this possible to do..???
Well your "server" would be listening for connections yes? Make a special case for listening for a special "are you a chat server?" command.
Then whenever you start up a chat application, have it broadcast your "are you a chat server?" command. If there is a server out there it would respond, letting you know that it is. You can then connect to it.
Comment