* Validates the socket options. * @param {ClientOptions.socketOptions} socketOptions * @private
(socketOptions)
| 242 | * @private |
| 243 | */ |
| 244 | function validateSocketOptions(socketOptions) { |
| 245 | if (!socketOptions) { |
| 246 | throw new TypeError('socketOptions not defined in options'); |
| 247 | } |
| 248 | if (typeof socketOptions.readTimeout !== 'number') { |
| 249 | throw new TypeError('socketOptions.readTimeout must be a Number'); |
| 250 | } |
| 251 | if (typeof socketOptions.coalescingThreshold !== 'number' || socketOptions.coalescingThreshold <= 0) { |
| 252 | throw new TypeError('socketOptions.coalescingThreshold must be a positive Number'); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * Validates authentication provider and credentials. |