PEERJS CHATROOM

CONNECTION STATUS

A MOMENT PLEASE...
DISCONNECTED FROM SIGNALLER?

Don't panic! Existing peer connections will not be affected. You can reconnect to signaller again if:

  • Host wants to accept new peer connections.
  • Client wants to connect to new host.

See the footnote for longer explanation.

NOT CONNECTED TO ANYONE

PEER LIST

MESSAGE BOARD

WHY RECONNECT?

PeerJS requires an intermediate "signaller" to initiate connection between two peers. Soon after two peers know how to reach each other, the signaller waits for a short time and then disconnect itself. This is to free up resources.

Thus, host and client have to reconnect to signaller again to make themselves discoverable by other peers.

ABOUT

A simple peer-to-peer chat room using PeerJS.

This is a sample project to demonstrate P2P connection using PeerJS and PeerJS Server.

The topology of this application can be classified as a star network where the hosting-peer facilitates all communications between client-peer. Note that hosting-peer is also part of the client-peer so it can participates in the chat.