|
Partial wildcards in the CN field of the host certificate are not currently supported in TLS host name validation. The host certificate must match the destination host name exactly. For example, a host certificate with CN=platform.domain.com can be validated, but CN=*.domain.com cannot. If your host is using certificates with wildcards, host name validation must be disabled.
|
Property
|
Description
|
||
---|---|---|---|
AllowSelfSignedCertificates(Boolean)
|
The default value is false. Set to true to accept self-signed certificates. Do NOT use this setting in a production environment.
|
||
AutoReconnect(Boolean)
|
The default value is false. If you want to reconnect automatically to the ThingWorx Platform when a connection is lost, set this property to true.
|
||
ClientKeyFileInfo.Claims
|
Through the use of a password callback function, stores the passphrase for a client key file.
|
||
ConnectRetries(String value)
|
Specify the number of retries when trying to establish a WebSocket connection. The Connect call returns an error after the retries are exhausted.
|
||
ConnectTimeout(String value)
|
Specify the number of milliseconds to wait for the WebSocket connection to be established.
|
||
DisableCertValidation(Boolean)
|
The default value is false. Set to true to notify the TLS library to not validate the server certificate. Do NOT use the true value in a production environment.
|
||
Enab leTlsHostnameValidation(Boolean)
|
Setting this value to true enables TLS host name validation. Setting it to false disables it. The default value is true.
|
||
ForceConnectOnFireEvent(Boolean)
|
Set to true to force a reconnect to send the message when in the disconnected state of the duty cycle,
|
||
ForceConnectOnInvokeServiceBoolean)
|
Set to true to force a reconnect to send the message when in the disconnected state of the duty cycle,
|
||
ForceConnectOnReadProperty(Boolean)
|
Set to true to force a reconnect to send the message when in the disconnected state of the duty cycle,
|
||
ForceConnectOnWriteProperty(Boolean)
|
Set to true to force a reconnect to write a property when in the disconnected state of the duty cycle.
|
||
IdlePingRate(String value)
|
Set the WebSocket keep alive rate. Used to ensure the connection stays open. Measured in seconds. This value should never be greater than the ThingWorx Platform side setting, which defaults to 60 seconds.
|
||
MaxConnectDelay(String value)
|
Set the maximum delay before connecting. Measured in milliseconds.
|
||
MaxMessages(String value)
|
Set the maximum number of messages that have not been processed to allow in the message queue.
|
||
MaxMessageSize(String value)
|
Set the maximum size of a complete message whether it is broken up as a multipart message or not. Messages larger than this will be rejected. Measured in bytes.
|
||
MaxMsgHandlerThreadCount and MaxApiTaskerThreadCount
|
REQUIRED. Set the maximum size of the thread pools. For example, 8 threads for each property.
|
||
MessageChunkSize(String value)
|
Set the maximum size of a message chunk, in bytes. Messages large than this will be broken up into a multipart message. This value should be the same as the ThingWorx Platform side configuration which defaults to 8192.
|
||
MessageFrameSize(String value)
|
Set the maximum size of a message frame (in bytes).
|
||
MessageTimeout(String value)
|
Set the number of milliseconds to wait for the ThingWorx platform to respond to a ping message.
|
||
Name(String value)
|
Optional. Set the name of the client. For example:
Name = "SteamSensorGateway",
If the name property is not set, the .NET SDK will use a prefixed GUID for the gateay name BIND requests.
|
||
OfflineMsgStoreDir
|
REQUIRED IF using the Offline Message Store. Setting this property tells the SDK where to put the offline message store. The directory specified must be writable from the application. Here is an example:
OfflineMsgStoreDir = Environment.CurrentDirectory = Environment.GetEnvironmentVariable("userprofile")
For details about the Offline Message Store, refer to .NET SDK ClientConfigurator: Offline Message Store.
|
||
PongTimeout(String value)
|
Set the number of milliseconds to wait for the ThingWorx platform to respond to a ping message.
|
||
ReconnectInterval(String value)
|
REQUIRED. Set the number of seconds to wait before retrying the connection. For example:
ReconnectInterval = 15,
|
||
SecurityClaims
|
REQUIRED. Pass the appKeyCallback function to the Claims object of the ClientConfigurator. This function should retrieve an application key from a secure source at runtime. The application will need the application key to acces the ThingWorx Platform. For more information and an example, refer to Encrypting Passwords and application keys and Security Claims and Encrypted application key (v.5.8.0+). Refer to .NET SDK: SecurityClaims Class.
|
||
setType(String value)
|
Set the type of the client.
|
||
SocketReadTimeout(String value)
|
Set the socket read timeout. The default value of this property is 0, which is recommended as a best practice to achieve optimal performance when transferring large files. Refer to Best Practices for Transferring Large Files.
|
||
StaleMsgCleanupRate
|
Set the rate of periodic cleanup rate multipart messages that never receive all of the expected number of message chunks. Measured in milliseconds.
|
||
StreamBlockSize
|
Set the incremental block size for dynamically allocated stream (byte array) variables. When adding bytes to a stream, this is the size of memory allocated if more memory is needed.
|
||
Uri(String uri)
|
REQUIRED. Set the URI to use for connecting to the ThingWorx Platform. This URI is in the following form for secure websockets:
wss://<server>:<port>/ThingWorx/WS
Where <server> is the IP address or domain name of the ThingWorx Platform and <port> is the port that the ThingWorx Platform is listening on.
The SteaamSensorClient.cx example pulls this URI from the command line property values for the application, as shown here:
Uri = args[0],
|
|
To learn how to bind entities to ThingWorx, refer to ConnectedThingClient
Methods.
|
|
In production, the callback should obtain an application key or other required PASSWORD from a secure source.
|
|
For information on the C# delegate type, visit Delegates (C# Programming Guide).
|