Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: duncan.greenyer on April 07, 2023, 08:28:25 pm
-
Does anyone know if its possible to create a Web Socket in EA's javascript engine or even a basic network socket?
-
The Javascript Engine is Spidermonkey v63.
Yes in theory, it should be possible to create a Web Socket in Sparx EA JavaScript engine.
Here is an example of how to use websocket with javascript you could try.
https://www.dev2qa.com/how-to-use-websocket-in-javascript-with-examples/#:~:text=How%20To%20Use%20WebSocket%20In%20Javascript%20With%20Examples,2.%20How%20To%20Use%20WebSocket%20In%20JavaScript%20Example. (https://www.dev2qa.com/how-to-use-websocket-in-javascript-with-examples/#:~:text=How%20To%20Use%20WebSocket%20In%20Javascript%20With%20Examples,2.%20How%20To%20Use%20WebSocket%20In%20JavaScript%20Example.)
-
Thanks for the response however, new WebSocket does not work, it appears that this library has not been included or the version of Spider Monkey is too old. I did look for a COM/ActiveX version but this is messy and a security flaw. I cannot use V8 require or module imports so there seems no way to invoke a web socket which is a shame.
-
Ignore this post, I have solved my issue.