I am working on developing p2p chat system and also file share system....
But only thing is that ...i can't find out the way to find how to implement it...i have worked on client server programs but i m not able to get p2p...
The concepts of P2P are:-
1. All nodes connected can act both as server and client depending on requirement....
2. They can connect to each other find file who is the owner of file and then ask for file....

Hope anyone can help me in doing this....

On this link you can download an example of P2P allowing file sharing, messaging between peers, an a few utilities more. This is an open source from Source Forge so you must honor the creator open source license.

Hope this helps.