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.
attributefullcolor_codecsOptional[List[str]]= Noneattributetenbit_codecsOptional[List[str]]= Noneattributetab_idOptional[str]= NoneThe browser tab the page runs in, which tells a page taking its own controller back from another page's controller joining beside it; None for a page that names none.
attributecc_start_kbpsAny= NoneThe rate congestion control last held this page's
display at, as the page kept it (RateHold); None for none.
attributepage_sizeOptional[Tuple[int, int]]= NoneThe width and height the page's first resize will ask for, which a primary's capture can start at; None for a page that names none, as one before it did not.
attributeresume_keyOptional[str]= NoneThe secret a hello names to carry on this client's session after its socket was cut; None for a page that names none.
attributeheldList[str]= field(default_factory=list)Lines addressed to this client while its session is held.
Functions
constructor__init__(uid, ws, raddr, peer_type, client_type, client_slot, client_strict_viewer, client_token=None, peer_status=None, display_id='primary', display_position='right', fullcolor_codecs=None, tenbit_codecs=None, tab_id=None, cc_start_kbps=None, page_size=None, resume_key=None, held=list()) -> NoneparamuidstrparamwsWebSocketResponseparamraddrstrparampeer_typestrparamclient_typeOptional[str]paramclient_slotOptional[int]paramclient_strict_viewerOptional[bool]paramclient_tokenOptional[str]= Noneparampeer_statusOptional[str]= Noneparamdisplay_idstr= 'primary'paramdisplay_positionstr= 'right'paramfullcolor_codecsOptional[List[str]]= Noneparamtenbit_codecsOptional[List[str]]= Noneparamtab_idOptional[str]= Noneparamcc_start_kbpsAny= Noneparampage_sizeOptional[Tuple[int, int]]= Noneparamresume_keyOptional[str]= NoneparamheldList[str]= list()Returns
None