Re: [Pharo-users] Problem with ZnWebSocket and closed connections
Hi Davide, I am away until next week, then I might try to answer, though you are talking about a complicated setup. Sven
On 20 Feb 2020, at 19:08, Davide Varvello via Pharo-users <pharo-users@lists.pharo.org> wrote:
From: Davide Varvello <varvello@yahoo.com> Subject: Problem with ZnWebSocket and closed connections Date: 20 February 2020 at 19:08:43 GMT+1 To: pharo-users@lists.pharo.org
Hi guys! I've a problem with websockets, I'm quite a noob on the subject and I'm doing some tests with them.
I run the echo websocket this way:
ZnServer startDefaultOn: 8000. ZnServer default delegate: (ZnWebSocketDelegate handler: ZnWebSocketEchoHandler new).
I tested it with with the chrome extension (https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngb...) that emulates a websocket client. If I point to the url ws://localhost:8000 everyting is fine BUT I want to test the websocket server via ngrok (https://ngrok.com/) and if I point the client to the ngrok url (i.e. ws://myurl.ngrok.io that maps localhost:8000) it happens a connection-closed after a while and I can't understand the cause, is there a timeout somewhere?
I know that it is something related to Pharo (and not to ngrok) because if I implement a simple echo websocket served via websocketd (http://websocketd.com) the connection stays always active even if through ngrok.
Can you help me please? TIA Davide
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi Sven, Sorry, I put too many useless details in my previous email. The core issue is that if I point to the websocket directly (ws://localhost:8000) the connection lasts, otherwise it disconnects after a while. Cheers Davide Sven Van Caekenberghe-2 wrote
Hi Davide,
I am away until next week, then I might try to answer, though you are talking about a complicated setup.
Sven
On 20 Feb 2020, at 19:08, Davide Varvello via Pharo-users <
pharo-users@.pharo
> wrote:
From: Davide Varvello <
varvello@
>
Subject: Problem with ZnWebSocket and closed connections Date: 20 February 2020 at 19:08:43 GMT+1 To:
pharo-users@.pharo
Hi guys! I've a problem with websockets, I'm quite a noob on the subject and I'm doing some tests with them.
I run the echo websocket this way:
ZnServer startDefaultOn: 8000. ZnServer default delegate: (ZnWebSocketDelegate handler: ZnWebSocketEchoHandler new).
I tested it with with the chrome extension (https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngb...) that emulates a websocket client. If I point to the url ws://localhost:8000 everyting is fine BUT I want to test the websocket server via ngrok (https://ngrok.com/) and if I point the client to the ngrok url (i.e. ws://myurl.ngrok.io that maps localhost:8000) it happens a connection-closed after a while and I can't understand the cause, is there a timeout somewhere?
I know that it is something related to Pharo (and not to ngrok) because if I implement a simple echo websocket served via websocketd (http://websocketd.com) the connection stays always active even if through ngrok.
Can you help me please? TIA Davide
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
participants (2)
-
Davide Varvello -
Sven Van Caekenberghe