Because version 2.1.0.40 of the third-party
WebSockets API does not support TLS-enabled connections, servers configured for secure communications cannot properly respond to requests made by the API. The client may receive the following HTTP handshake response:
HTTP/1.1 400 Bad Request
Date:xx
Content-Type: text/html
Content-Length: xx
Connection: close
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
</body>
</html>
Follow these steps to enable a TLS connection in LabVIEW:
- Use LabVIEW 2020 or later, which supports TLS functions.
- Enable the WebSocket API as described in the article How Do I Use WebSockets for Data Communication in LabVIEW?
- Replace the VI in the WebSocket API library with the VI of the same name included in the attachment.
- Run your application.