{"id":36798987,"url":"https://github.com/dnsge/go-basic-websocket","last_synced_at":"2026-01-12T13:32:35.149Z","repository":{"id":57539613,"uuid":"289121707","full_name":"dnsge/go-basic-websocket","owner":"dnsge","description":"A simple WebSocket client","archived":false,"fork":false,"pushed_at":"2024-01-26T20:07:52.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-27T21:25:23.357Z","etag":null,"topics":["golang","websocket","websocket-client"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnsge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-20T22:17:12.000Z","updated_at":"2024-01-26T20:07:55.000Z","dependencies_parsed_at":"2022-09-26T18:31:49.958Z","dependency_job_id":null,"html_url":"https://github.com/dnsge/go-basic-websocket","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dnsge/go-basic-websocket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsge%2Fgo-basic-websocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsge%2Fgo-basic-websocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsge%2Fgo-basic-websocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsge%2Fgo-basic-websocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnsge","download_url":"https://codeload.github.com/dnsge/go-basic-websocket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsge%2Fgo-basic-websocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28339166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","websocket","websocket-client"],"created_at":"2026-01-12T13:32:31.119Z","updated_at":"2026-01-12T13:32:34.998Z","avatar_url":"https://github.com/dnsge.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-basic-websocket\n\nSimple WebSocket client\n\nExample program using https://www.websocket.org/echo.html:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/dnsge/go-basic-websocket\"\n\t\"net/http\"\n\t\"sync\"\n\t\"time\"\n)\n\nfunc main() {\n\t// simple echo websocket\n\theaders := http.Header{\n\t\t\"User-Agent\": []string{\"echo-client/1.0\"},\n\t}\n\tws := basicws.NewBasicWebsocket(\"wss://echo.websocket.org\", headers)\n\twg := sync.WaitGroup{}\n\n\tws.OnConnect = func() {\n\t\tfmt.Println(\"Connected to server!\")\n\n\t\ttime.AfterFunc(time.Second*3, func() {\n\t\t\tws.SendString(\"Hello, world!\")\n\t\t})\n\t}\n\n\tws.OnMessage = func(b []byte) error {\n\t\tfmt.Printf(\"Received message: %s\\n\", string(b))\n\t\tws.Disconnect()\n\t\twg.Done()\n\t\treturn nil\n\t}\n\n\twg.Add(1)\n\t_ = ws.Connect()\n\n\twg.Wait()\n}\n```\n\nOutput:\n```text\nConnected to server!\nReceived message: Hello, world!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsge%2Fgo-basic-websocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnsge%2Fgo-basic-websocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsge%2Fgo-basic-websocket/lists"}