This is handled by the Atlas network. Each Blockstack node participates in the Atlas network, and builds a 100% replica of all of the names' zone files. The zone files are used to bootstrap app-specific peer discovery.
Each Atlas zone file gives you 4KB of "scratch space" to store whatever discovery information you want. For example, your zone file today contains URLs to signed replicas of your profile (used by Onename), as well as a public key (used to sign off-chain data). As another example, I just added support for looking up Tor .onion addresses using Blockstack names by writing the .onion address to the Blockstack name's zone file (PoC here: https://github.com/jcnelson/blockstack-tor).
You'd be able to build a p2p chat app in Blockstack simply by having each app user write their preferred signaling server's URL into their zone files. We're working on native support for this here: https://github.com/jcnelson/hermes.