The signalingClient COMP is a component that can be used to connect to a signalingServer COMP within TouchDesigner as well as exchange messages with other signalingClients through the signaling server it is connected with.
When a client is sending a signaling message to the server, a target should be specified as part of the Signaling API. More details about the Signaling API are available at Palette:signalingServer#SignalingAPI
The server is using the
target property to route the message to a matching, connected, client.
The receiving client is then parsing the message and routing the message to a matching method using the
i.e. A signalingClient COMP is receiving a message where
message['signalingType'] is equal to
onMessageReceivedClientEntered() method will be called.
If no matching method is found, the signalingClient will fail gracefully.
While we advise to make use of Subscribers and the
Subscribe() method to extend the signalingClient, users that want to extend the Signaling API with custom types should add new methods prefixed by
i.e If a user wants to add a custom type
Animal, a matching method
onMessageReceivedAnimal() should be available in the Palette:signalingClient Ext.
More details about Subscribers and the
Subscribe() method are available on this page.
The communication protocol used as part of this signalingClient is WebSocket.
It is often used as part of WebRTC sessions.
Parameters - Signaling Client Page
Active - Start or stop the signaling client.
Reset - Restart the signaling client and reset all states.
Host - The signaling server IP or URL to connect to. If the server is secured, it should use a secure protocol such as wss://.
Port - Port on which this client will connect to the signaling server. If attempting a secure connection not using port 443 then a "wss://" prefix is required on the Host parameter.
Forward To Subscribers
Forwardtosubscribers - When enabled, any message received with a type that matches a type registered by a subscriber using the Subscribe() method will be forwarded to the registered subscriber.
Clientname - An optional parameter to be used to identify the client. Default is set when the client connected to a signaling server and a UUID was sent back.
Use JSON Schema In
Usejsonschemain - Validate incoming Signaling API messages against JSON Schema.
Use JSON Schema Out
Usejsonschemaout - Validate outgoing Signaling API messages against JSON Schema.
Use local RefResolver
Uselocalrefresolver - Use JSON Schema files installed locally rather than validating from remote sources. Schema files available at https://github.com/TouchDesigner/SignalingAPI
Local Schema Folder
Localschemafolder - A folder where the JSON Schema files for the Signaling API are available locally.
Clear schema cache
Clearschemacache - Signaling API schema files are loaded once. Clearing the cache force them to reload on the next call that requires JSON Schema.
Signaling API Version
Signalingapiversion - The Signaling API version. When a signaling client is being used, the API version of both the server and client should match.
Signaling API Schema Endpoint
Signalingapischemaendpoint - The endpoint being used to fetch the JSON Schema files.
Parameters - Logger Page
Enablelogging - Enable advanced logging features. Useful to debug and track the signaling client activity.
Log to File
Logtofile - When enabled, logging messages will be written to a time rotating log file.
Logfolder - Path to the folder in which the log files will be written.
Filerotation - Number of backup files to be kept when rotating log.
Log to Textport
Logtotextport - When enabled, log messages will be displayed in the textport.
Log to Status Bar
Logtostatusbar - When enabled, log messages will be displayed in the status bar.
Loglevel - ⊞ - Filter level of log messages. The selected level is included as well as all levels above. i.e. if Warning is selected, Warning and Error messages will be included while Info messages will be excluded.
Parameters - About Page
Help - Open Help page in external browser.
Version - The component version number.