Administrators Farshad Mohajeri Posted January 20, 2023 Administrators Share Posted January 20, 2023 We are packing everything together and trying to release first uniGUI version supporting WebSockets. In uniGUI, WebSockets technology is used to create a messaging system which enables developers to broadcast message instantly to all available sessions. This will help developers to eliminate the need to use a polling mechanism to update clients. Instead clients can be instantly updated when there is a change in server side data. Estimated release date is January 2023. 8 1 2 1 Quote Link to comment Share on other sites More sharing options...
rgreat Posted January 22, 2023 Share Posted January 22, 2023 Does that mean that you will replace numerous "HandleEvent" Client->Server HTTP POST calls with Server->Client WebSocket messages? It yes, that could definitely speed up GUI fluidity in many scenarios. 2 Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 24, 2023 Author Administrators Share Posted January 24, 2023 On 1/23/2023 at 2:10 AM, rgreat said: Does that mean that you will replace numerous "HandleEvent" Client->Server HTTP POST calls with Server->Client WebSocket messages? It yes, that could definitely speed up GUI fluidity in many scenarios. uniGUI core will not use WebSockets. uniGUI will use HTTP to handle Ajax requests as always. Websockets will be used to construct a messaging system which can be used by developers when needed. Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted January 30, 2023 Share Posted January 30, 2023 @Farshad Mohajeri You said that the documentation included information about using websocket, but I didn't find anything.. release this information so we know what to do when the feature is ready. Quote Link to comment Share on other sites More sharing options...
picyka Posted February 4, 2023 Share Posted February 4, 2023 I've been looking every day here http://unigui.com/doc/online_help/ Still nothing came out. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 5, 2023 Share Posted February 5, 2023 On 2/4/2023 at 7:05 AM, picyka said: I've been looking every day here http://unigui.com/doc/online_help/ Still nothing came out. Hello,You will see there when build is published Quote Link to comment Share on other sites More sharing options...
picyka Posted February 21, 2023 Share Posted February 21, 2023 AlwaysUseHTTP = True http://unigui.com/doc/online_help/websockets--ssl.htm If web page uses https then wss will be used for WebSocket connection. This behavior can be overrode by setting AlwaysUseHTTP property to True. In this case WebSockets will use a non-secure connection regardless of the web page. I'm studying the WS, it will suggest several doubts, some may be childish. If my page is https, and I want to use WS as http by checking the AlwaysUseHTTP option, would that be allowed? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 21, 2023 Share Posted February 21, 2023 29 minutes ago, picyka said: by checking the AlwaysUseHTTP option, would that be allowed? Yes. Quote Link to comment Share on other sites More sharing options...
picyka Posted February 22, 2023 Share Posted February 22, 2023 Well, I'm trying to setup WS on a test server. my current scenario HTTPS page with CloudFlare HyperServer with IIS I don't have the SSL certificate (who makes the site https is cloudFlare) So basically I need to use http websockets Settings: MainModule: WebSocketConnection Enabled = True ServerModule WebSocketServer: AlwaysUseHTTP = True AuxPort = 8088 Binding = my ip server Enabled = True hyperserver cfg [websockets] enabled=1 aux_port=8088 max_queue_length=1000 binding=my ip server global_binding= global_port=0 external_server_url= external_server_token= always_use_http=1 forgive me for not understanding the whole configuration Quote Link to comment Share on other sites More sharing options...
picyka Posted February 27, 2023 Share Posted February 27, 2023 Em 2/22/2023 às 11:22, picyka disse: Bem, estou tentando configurar o WS em um servidor de teste. meu cenário atual Página HTTPS com CloudFlare HyperServer com IIS Eu não tenho o certificado SSL (quem faz o site https é cloudFlare) Então, basicamente, eu preciso usar websockets http Configurações: MainModule: WebSocketConnection Enabled = True ServerModule WebSocketServer: AlwaysUseHTTP = True AuxPort = 8088 Binding = my ip server Enabled = True hyperserver cfg [websockets] enabled=1 aux_port=8088 max_queue_length=1000 binding=my ip server global_binding= global_port=0 external_server_url= external_server_token= always_use_http=1 perdoe-me por não entender toda a configuração Does anyone know how to make it work in version 1565? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 On 2/22/2023 at 5:22 PM, picyka said: Well, I'm trying to setup WS on a test server. my current scenario HTTPS page with CloudFlare HyperServer with IIS I don't have the SSL certificate (who makes the site https is cloudFlare) So basically I need to use http websockets Settings: MainModule: WebSocketConnection Enabled = True ServerModule WebSocketServer: AlwaysUseHTTP = True AuxPort = 8088 Binding = my ip server Enabled = True hyperserver cfg [websockets] enabled=1 aux_port=8088 max_queue_length=1000 binding=my ip server global_binding= global_port=0 external_server_url= external_server_token= always_use_http=1 forgive me for not understanding the whole configuration There is no need to make settings in your application other than enabling MainModule.WebSocketsConnection. Since you are using a different port, binding is not needed to be specified. Above settings should work for you. Quote Link to comment Share on other sites More sharing options...
picyka Posted February 27, 2023 Share Posted February 27, 2023 42 minutes ago, Farshad Mohajeri said: There is no need to make settings in your application other than enabling MainModule.WebSocketsConnection. Since you are using a different port, binding is not needed to be specified. Above settings should work for you. Error without any configuration (image Error1) Error with settings in serverModule(Image Error2) Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 Which browser are you using? Quote Link to comment Share on other sites More sharing options...
picyka Posted February 27, 2023 Share Posted February 27, 2023 3 minutos atrás, Farshad Mohajeri disse: Qual navegador você está usando? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 3 minutes ago, picyka said: Let's investigate. 1 Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 23 minutes ago, Farshad Mohajeri said: Let's investigate. Can you try on Chrome as well? Quote Link to comment Share on other sites More sharing options...
picyka Posted February 27, 2023 Share Posted February 27, 2023 2 minutos atrás, Farshad Mohajeri disse: Você também pode experimentar no Chrome? Return the same error. If you want you can access my server through my computer. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 3 hours ago, picyka said: Return the same error. If you want you can access my server through my computer. Problem here is that you are using two different domains. One for regular website and other for websockets. If you use same domain or a subdomain for websockets then problem will be resolved. for example: Main domain: https://mywesapp.com Websockets domain defined in GlobalBinding property: ws.mywesapp.com Since both are under same domain browser will accept the connection. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 16 minutes ago, Farshad Mohajeri said: Problem here is that you are using two different domains. One for regular website and other for websockets. If you use same domain or a subdomain for websockets then problem will be resolved. for example: Main domain: https://mywesapp.com Websockets domain defined in GlobalBinding property: ws.mywesapp.com Since both are under same domain browser will accept the connection. Problem seems to be different. Browser doesn't allow a non-secure connection on WS if your main site is on HTTPS. It seems to be something that we have overlooked. You need to setup a secure websockets server. Quote Link to comment Share on other sites More sharing options...
picyka Posted February 27, 2023 Share Posted February 27, 2023 7 minutes ago, Farshad Mohajeri said: Problem seems to be different. Browser doesn't allow a non-secure connection on WS if your main site is on HTTPS. It seems to be something that we have overlooked. You need to setup a secure websockets server. I sent the settings in private, maybe you can tell me what I did wrong thank you for your support. Quote Link to comment Share on other sites More sharing options...
picyka Posted February 27, 2023 Share Posted February 27, 2023 4 minutos atrás, Farshad Mohajeri disse: O problema parece ser diferente. O navegador não permite uma conexão não segura no WS se o site principal estiver em HTTPS. Parece ser algo que esquecemos. Você precisa configurar um servidor websockets seguro. Now that I've seen this message. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 27, 2023 Author Administrators Share Posted February 27, 2023 We will update the documents accordingly. You need to get a SSL certificate for your websocket server such as for ws.mydomain.com and set it up in a separate HyperServer config. We will show it in our documents. A document is being prepared for various Websockets scenarios. 1 Quote Link to comment Share on other sites More sharing options...
kkelchev Posted March 6, 2023 Share Posted March 6, 2023 Hi team, Than is Very nice future Just one question. If application is in HYPER-server (farm) mode. Will all sessions receive the broadcast message including those from the other nodes ? Or If I send broadcast message from sessionID:ABCd2... and it exists on Node 2 (for example) Wiill (for example) SessionID:2321SD... on Node 4 receive this message also. Thanks Kamen Quote Link to comment Share on other sites More sharing options...
kkelchev Posted March 6, 2023 Share Posted March 6, 2023 Sorry for my stupid question. I found answer in documentation. uniGUI Developer Manual Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 7, 2023 Author Administrators Share Posted March 7, 2023 There are issues when HyperServer is used. We are addressing them. Build 1566 is coming. There are some missing information in the document. All will be fixed. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.