{"id":49889,"library":"gorilla-websocket","title":"Gorilla WebSocket","description":"Package websocket implements the WebSocket protocol defined in RFC 6455.","status":"active","version":"1.5.3","language":"go","source_language":null,"source_url":"https://github.com/gorilla/websocket","tags":["websocket","realtime","networking"],"install":[{"cmd":"go get github.com/gorilla/websocket","lang":"bash","label":"Install github.com/gorilla/websocket"}],"dependencies":[],"imports":[{"symbol":"websocket","correct":"github.com/gorilla/websocket"}],"quickstart":{"code":"import \"github.com/gorilla/websocket\"\n\nvar upgrader = websocket.Upgrader{}\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n    conn, _ := upgrader.Upgrade(w, r, nil)\n    defer conn.Close()\n    for {\n        _, msg, _ := conn.ReadMessage()\n        conn.WriteMessage(websocket.TextMessage, msg)\n    }\n}","lang":"go","description":"Upgrade an HTTP connection to WebSocket and echo received messages."},"warnings":[{"fix":"Set Upgrader.CheckOrigin to a function that validates the Origin header.","message":"The default CheckOrigin allows all origins, which may be insecure in production.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'6455':12 'defin':9 'gorilla':1 'implement':5 'network':15 'packag':3 'protocol':8 'realtim':14 'rfc':11 'websocket':2,4,7,13","created_at":"2026-06-14T18:19:15.126787+00:00","updated_at":"2026-06-14T18:19:15.126787+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/gorilla/websocket","github":"https://github.com/gorilla/websocket","docs":"https://pkg.go.dev/github.com/gorilla/websocket#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-14","next_check":"2026-12-11","install_tag":null}}