The qz.websocket.connectConfig object defines the default parameters used when establishing a connection to the QZ Tray software. You can override these values by passing an options object to qz.websocket.connect.
Key configuration properties include:
host: An array of hostnames (e.g., ["localhost", "localhost.qz.io"]).usingSecure: Boolean indicating whether to use the secure protocol (wss://).protocol: An object containing secure (e.g., "wss://") and insecure (e.g., "ws://") prefixes.port: An object containing arrays of secure and insecure ports.keepAlive: Time in seconds between pings to maintain the connection.retries: Number of reconnection attempts before failing.delay: Seconds to wait before initiating a connection.
// Example of what the default connectConfig looks like
// You can pass a subset of these to qz.websocket.connect(options)
{
host: ["localhost", "localhost.qz.io"],
usingSecure: true,
protocol: {
secure: "wss://",
insecure: "ws://"
},
port: {
secure: [8181, 8282, 8383, 8484],
insecure: [8182, 8283, 8384, 8485]
},
keepAlive: 60,
retries: 0,
delay: 0
}