Connecting to a websocket from a different server

Is it possible to do the following within Katalon?

http://stackoverflow.com/questions/32016487/how-to-connect-to-a-websocket-from-a-different-server

In particular, something like this:

 var ws = new WebSocket('wss://ServerA:8080/', 'echo-protocol'); ws.onopen = function () {     console.log('socket connection opened properly');     ws.send("Hello World"); // send a message     console.log('message sent'); }; ws.onmessage = function (evt) {     console.log("Message received = " + evt.data); }; ws.onclose = function () {     // websocket is closed.     console.log("Connection closed..."); };

I was able to connect to a WebSocket server on my localhost with the following website example.
https://www.eclipse.org/jetty/documentation/9.1.5.v20140505/jetty-websocket-client-api.html
I implemented the two classes shown in the example URL as keywords in Katalon, and then I used SimpleEchoClient keyword in a test script to connect and send and receive messages to the server. Adapting the SimpleEchoSocket file should get you something close to your specific needs.

can you please share the code

I am facing this error when I try to cover the classes in to keywords

can you be able to help me on this