<>"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"encoded_token=:crypto.hash(:sha,resp_token)|>Base.encode64conn|>put_resp_header("Upgrade","websocket")|>put_resp_header("Connection","Upgrade")|>put_resp_header("Sec-Websocket-Accept",encoded_token)|>send_resp(101,"Switching Protocol")|>haltend
WebSocket connection.Config// Handshake is an optional function in WebSocket handshake.// For example, you can check, or don't check Origin header.// Another example, you can select config.Protocol.Handshakefunc(*Config,*http.Request)error// Handler handles a WebSocket connection.Handler}// ...