I was thinking to design a application which is not dependent on server and can directly send and receive data to and from other clients.I learned it is possible with UDP but how can new users join in the network and is it possible for any node to calculate active nodes .I would implement this with Socket programming using java .
The Satoshi client discovers the IP address and port of nodes in several different ways.
Nodes discover their own external address by various methods.
Nodes receive the callback address of remote nodes that connect to them.
Nodes makes DNS request to receive IP addresses.
Nodes can use addresses hard coded into the software.
Nodes exchange addresses with other nodes.
Nodes store addresses in a database and read that database on startup.
Nodes can be provided addresses as command line arguments
Nodes read addresses from a user provided text file on startup
That last item is probably a reference to this line
CAutoFile filein = fopen("addr.txt", "rt"); in
db.cpp in the
src folder of Bitcoin 0.1.0