After reviewing your sample, I see that there is no code to send any message from Unigui to sgcWebSockets server and this must be implemented from Unigui side. Some Unigui customers have implemented their own scripts using websocket as protocol.
If you open a Web Browser session to following url link:
http://127.0.0.1:8189/sgcWebSockets.html
You can test websocket protocol in your sample. If you press Open and then Send button, you will receive a message from webbrowser in your Application.