Skip to content

Function: peerIdentity() ​

ts
function peerIdentity(state): string | null;

The far side of a p2p pair, or null while there is nobody to negotiate with.

Self is excluded here rather than at the fan-out, because the server tells a joining participant about its own join and a client that takes itself for the far peer negotiates with itself — which the server answers protocol_error: a participant cannot negotiate with itself, correctly, and which reads in a log as the client being broken in some subtler way.

Parameters ​

ParameterType
stateRoomState

Returns ​

string | null

Talkline documentation