WebSockets module
Overview
A module for using WebSockets, containing JavaScript actions for consuming a WebSocket and Java actions for publishing a WebSocket on the Mendix server, using Core.addWebSocketEndpoint().
More info in the Mendix documentation: https://docs.mendix.com/refguide/websockets-in-runtime/
Documentation
Description
A module for using WebSockets, containing JavaScript actions for consuming a WebSocket and Java actions for publishing a WebSocket.
I've created this after I found out about the addWebSocketEndpoint method in com.mendix.core.Core (Mx Runtime API)
Typical usage scenario
Send or receive data directly from your browser (client side)
Features and limitations
JavaScript actions
- WebSocket_Create
- WebSocket_SendMessage
- WebSocket_Close
Java actions
- WebSocketEndpoint_Create
- WebSocketEndpoint_SendDataToClients
Dependencies
- Mendix modeler version 8.13.1 or higher
- Community Commons module (only for demo/testing)
Configuration
Use the JavaScript Actions in the “Javascript actions (Client)” folder from your nanoflow(s). You check out the contents of the “Test” folder for an example implementation.