Palette:signalingClient
Summary
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 signalingType
property.
i.e. A signalingClient COMP is receiving a message where message['signalingType']
is equal to ClientEntered
, the 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 onMessageReceived
.
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.
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.
Usejsonschemain
- Validate incoming Signaling API messages against JSON Schema.
Usejsonschemaout
- Validate outgoing Signaling API messages against JSON Schema.
Uselocalrefresolver
- Use JSON Schema files installed locally rather than validating from remote sources. Schema files available at https://github.com/TouchDesigner/SignalingAPI
Localschemafolder
- A folder where the JSON Schema files for the Signaling API are available locally.
Clearschemacache
- Signaling API schema files are loaded once. Clearing the cache force them to reload on the next call that requires JSON Schema.
Signalingapiversion
- The Signaling API version. When a signaling client is being used, the API version of both the server and client should match.
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.
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.
Logtotextport
- When enabled, log messages will be displayed in the textport.
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.
- INFO
INFO
-
- DEBUG
DEBUG
-
- WARNING
WARNING
-
- ERROR
ERROR
-
- CRITICAL
CRITICAL
-
Parameters - About Page
Help
- Open Help page in external browser.
Version
- The component version number.
TouchDesigner Build: