You probably know all this already and forgive me if so but normally a central server manages the clients and connections; it's IP could be distributed with the clients and they then connect to the server rather than each other.
In a pure peer-to-peer network, which is what your serverless chat is, the clients (or, more correctly, peers) don't know who to connect to. So how do they discover each other? The obvious way is for peers to broadcast UDP packets (sent to 255.255.255.255), and listen for these from other peers. A list of IP's discovered can be maintained, and the user can then initiate direct TCP connections (on a different port) to one or more of these.
Here are some snags:
* UDP is a 'fire and forget' protocol- you don't how far your packet got.
* UDP broadcasts are normally blocked by firewalls, unless you explicitly open up the port for UDP (not recommended for security).
The good news is, the basic mechanism of text chat using the Winsock control is fairly easy.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"