Are there any plans for a Websockets listen function?
Allowing peer to peer applications in the browser could be revolutionary.
I found this answer: Will HTM
Tangentially related to your question, but you did say "p2p in the browser", so..
The Flash player has p2p APIs that allow direct connection with other peers (typically other browsers) over UDP.
The APIs are geared toward using those connections for voice/video streaming, but it seems possible to use them for generic message passing as well.
The tricky point of course is "how do peers find each others?". Currently, Adobe offers a free/beta service to do that, called Cirrus (formerly Stratus). It's also possible to buy Flash Media servers from Adobe to do the same (which also provide TCP server-based fallbacks for folks that are behind UDP-unfriendly firewalls.) Presumably, open-source alternatives like Red5 will have support for it too at some point.
The WebSockets API does not provide a way to listen for connections; it is client only.
You might be interested in Opera Unite.
Update:
Also check out pusherapp. It's a WebSockets service online. They charge for over 5 clients, but it's super simple to setup and use. Depending on what your p2p application requirements are, it might suffice.
Old question, but I was wondering the same thing, and came across peer-server, which might be worth having a look at. It uses WebRTC, and looks like it does what you're thinking:
https://github.com/PeerServer/peer-server
If you are not looking for a generic browser solution, for non secure and limited connections you may use a Google Chrome extension to do the job:
Web Server for Chrome
https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb