You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
I dont have any code, I have to do it, the basic is that chat doesn't have constantly server, when one client it join like first, that client will be server, when this client quit, next client will be turned to server.
just do what I did with my instant messaging program. but in the run method when it calls the exception just have it make it a server socket instead of a client socket
__________________
Definition of Impossible = making a good game in Java.
Few things comes in mind about such system. You need to have some sort of discovery system of the clients. User can keep the list of clients in local database and try to connect each until it gets a live client.
Clients can then coordinate with each other for the discovery. A general topology of p2p file sharing system will help.
Look for other ideas for the discovery
Once they are discovered .. a client can act both .. client as well as server with other peer ..
__________________
dont worry newbie, we got you covered.
No matter what you do you still need one or a few central places where to register potential servers and where clients can find the addresses of potential servers. Otherwise you have a chicken and egg problem.
__________________
Daniel @ [www.littletutorials.com]
Language is froth on the surface of thought