Hello to everyone.
I am trying to create a napster-like p2p network. It consists of an index server with known IP and port holding meta-data about every shared file. A peers connects to this server and searches for a file. The server gives to the peer information on which peer has the file (providing his IP and port) and then the asking peer connects with the 'target' peer and copies/downloads the file to his shared folder. The question is the following: how can I achieve peer-to-peer communication ie. not via the Server but directly from a peer to another peer. Can someone give me a clue (some lines of code) on how a process can make connections and also recieve connection calls?
Thank you for your time!