In Crystal it is possible to connect to a Websocket

Asked

Viewed 62 times

2

I’m starting at the Crystal and I want to try to create a connection of a Websocket server with Crystal as client, it is possible to do so, there is some bookstore for this or the Crystal language already brings?

  • Wouldn’t be the class Socket?

1 answer

3


I found this on the Keepcoding that helped me to resolve my doubt, can still consult the link of Github for more information:

socket = HTTP::WebSocket.open("example.com", "/connect")
socket.send "action"
message = socket.receive

Browser other questions tagged

You are not signed in. Login or sign up in order to post.