In Crystal it is possible to connect to a WebSocket

2

I'm starting in Crystal and I want to try to create a connection from a WebSocket server with Crystal as client, is it possible to do it, is there any bookstore for this or is crystal language already available?

    
asked by anonymous 01.09.2017 / 12:50

1 answer

3

I found this in KeepCoding that helped me to solve my question, you can still check the GitHub for more information:

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