Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

No client examples at all #36

Open
PaulGWebster opened this issue Jan 28, 2016 · 7 comments
Open

No client examples at all #36

PaulGWebster opened this issue Jan 28, 2016 · 7 comments

Comments

@PaulGWebster
Copy link

Why is every example acting as a server?

@vti
Copy link
Owner

vti commented Feb 5, 2016

So you contribute and write one ;)

@PaulGWebster
Copy link
Author

Mhmmm I needed it for poe so I wrote https://metacpan.org/pod/POE::Component::Client::WebSocket

;-)

@pascal-dev
Copy link

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 :-)

@vti
Copy link
Owner

vti commented Jan 4, 2017

It's already written. Check out https://github.com/vti/protocol-websocket/blob/master/util/wsconsole

@pascal-dev
Copy link

Thank you.
It works with "ws://echo.websocket.org" but not with "wss://echo.websocket.org" (secure WebSocket (TLS)).
Something has to be changed ?

@vti
Copy link
Owner

vti commented Jan 4, 2017

That would require AnyEvent::Handle with tls connect.

@pascal-dev
Copy link

Thanks !
I added 'tls => "connect",' in your script (after line 42) and it works with secure Web Socket (URL like "wss://...").

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants