Open PaulGWebster opened 8 years ago
So you contribute and write one ;)
Mhmmm I needed it for poe so I wrote https://metacpan.org/pod/POE::Component::Client::WebSocket
;-)
Please, could you give a script example using the "ws://echo.websocket.org" web socket ?
This web socket can be tested here : it sends back messages similar to the ones it receives. This client script would demonstrate how to connect to the web socket, send messages and get messages (for example, it would send "xxx" and get back "xxx").
Thank you very much in advance :-)
It's already written. Check out https://github.com/vti/protocol-websocket/blob/master/util/wsconsole
Thank you. It works with "ws://echo.websocket.org" but not with "wss://echo.websocket.org" (secure WebSocket (TLS)). Something has to be changed ?
That would require AnyEvent::Handle with tls connect.
Thanks ! I added 'tls => "connect",' in your script (after line 42) and it works with secure Web Socket (URL like "wss://...").
Why is every example acting as a server?