- Download and install the WebSockets by MediaMongrels - Toolkit for LabVIEW Download from the VI Package Manager.
- This will add functions for WebSockets to the Data Communication package.
- This package was developed by Sam Sharp of MediaMongrels Ltd
- In the Package Information page on the VI Package Manager, click "Show Examples."
- Open the "WebSockets Examples" project.
- Run the SingleConnection VI.
- When you run this VI, a browser window will open and it will be looking for index.html in the "Test Server" folder. index.html is located in the "Test Client." Change the file path in the URL from "Test Server" to "Test Client."
- While running, you can send data from the client to the server and vice versa.
Additional Information
WebSocket is a TCP protocol different from HTTP that facilitates real-time communication between a client and a server. Please take note that the LabVIEW Toolkit for Websocket is developed by MediaMongrels and is not supported by NI. Support is provided for free at GitHub repository for
LabVIEW Websocket API and by MediaMongrels Ltd.