Peer
A connected signaling peer (the in-process server or a browser client).
Attributes
attributeuidstrRegistry key, "server-" or "client-" prefixed UUID.
attributewsWebSocketResponseThe peer's WebSocket.
attributeraddrstrRemote address, for logging.
attributepeer_typestrEither "server" or "client".
attributeclient_typeOptional[str]For clients, "viewer" or "controller".
attributeclient_slotOptional[int]Player slot number, or -1 when unassigned.
attributeclient_strict_viewerOptional[bool]Whether the client is a strict shared viewer.
attributeclient_tokenOptional[str]= NoneSecure-mode session token; matched against the active mk token to grant a viewer read-write collaboration (websockets mk-token parity).
attributepeer_statusOptional[str]= NoneNone until paired, then "session" or the room id.
attributedisplay_idstr= 'primary'Display this peer drives ("primary", "display2", ...); controller and slot uniqueness are scoped per display so a second display's client never evicts the primary (websockets parity).
attributedisplay_positionstr= 'right'Where a secondary display sits relative to the primary ("right"/"left"/"up"/"down"), carried to the server side so it lays the framebuffer out like websockets mode.
Functions
func__init__(self, uid, ws, raddr, peer_type, client_type, client_slot, client_strict_viewer, client_token=None, peer_status=None, display_id='primary', display_position='right') -> NoneparamselfparamuidstrparamwsWebSocketResponseparamraddrstrparampeer_typestrparamclient_typeOptional[str]paramclient_slotOptional[int]paramclient_strict_viewerOptional[bool]paramclient_tokenOptional[str]= Noneparampeer_statusOptional[str]= Noneparamdisplay_idstr= 'primary'paramdisplay_positionstr= 'right'Returns
None