websocket
websocket copied to clipboard
⚠️ Deprecated repository, available within Fiber Contrib.
I tried to adapt this example for go fiber v2 websockets https://gist.github.com/mowings/dad4917b6fc21e6e5ffe2da3b16e7ef9 ```golang func main() { rpc.Register(new(Arith)) http.Handle("/ws", websocket.Handler(serve)) http.ListenAndServe("localhost:7000", nil) } func serve(ws *websocket.Conn) { log.Printf("Handler starting") jsonrpc.ServeConn(ws) log.Printf("Handler...
I tried: `err = c.Close() if err != nil { log.Println(err) }` But nothing happen(
I'm trying to use the session middleware with websocket cmd using cobra ```go package cmd import ( "code.local/idc77/socktest/websocket/handler" "errors" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/session" "github.com/gofiber/websocket/v2" "github.com/spf13/cobra" "net" "os" "strings" ) const ( prefixTCP...
write tcp4 127.0.0.1:4000->127.0.0.1:24754: wsasend: An established connection was aborted by the software in your host machine. ##problem when i open browser first time all is ok ... but by refrreshing...
write tcp4 127.0.0.1:4000->127.0.0.1:24754: wsasend: An established connection was aborted by the software in your host machine. ##problem when i open browser first time all is ok ... but by refrreshing...
im using the chat example as in the fasthttp/webscoket repo's example and the SetWriteDeadline throws error each time a user disconnect which does not recover till server is restarted c.Conn.SetWriteDeadline(time.Now().Add(writeWait))