Disclosed is a method for controlling access to a chat room using a
peer-to-peer ("P2P") network. The method includes the steps of sending a
search request to a first set of nodes in the P2P network, the first set
of nodes neighboring a node requesting the search and including at least
one node; forwarding the request to a second set of nodes neighboring the
at least one node in the first set, the second set of nodes including at
least one node; comparing the search request to a local profile topic
list in each node in the first and second sets; receiving a zero or more
responses from nodes in the first and second sets; and establishing a
network connection between the node requesting the search and at least
one of the nodes responding to the request to form a community.