{"id":24167628,"url":"https://github.com/zoujiaqing/qrpc","last_synced_at":"2025-06-30T00:32:52.295Z","repository":{"id":239712497,"uuid":"800333225","full_name":"zoujiaqing/qrpc","owner":"zoujiaqing","description":"QUIC protocol based simple RPC framework","archived":false,"fork":false,"pushed_at":"2024-05-22T11:27:04.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T15:33:10.742Z","etag":null,"topics":["quic","quic-client","quic-go","quic-server","rpc","udp"],"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/zoujiaqing.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-14T06:19:04.000Z","updated_at":"2024-06-19T11:15:01.604Z","dependencies_parsed_at":"2024-06-19T11:14:59.022Z","dependency_job_id":"836ef31e-36fc-4e4f-a0ba-fc31487fede1","html_url":"https://github.com/zoujiaqing/qrpc","commit_stats":null,"previous_names":["zoujiaqing/qrpc"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/zoujiaqing/qrpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoujiaqing%2Fqrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoujiaqing%2Fqrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoujiaqing%2Fqrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoujiaqing%2Fqrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoujiaqing","download_url":"https://codeload.github.com/zoujiaqing/qrpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoujiaqing%2Fqrpc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262689597,"owners_count":23349133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["quic","quic-client","quic-go","quic-server","rpc","udp"],"created_at":"2025-01-12T21:47:17.132Z","updated_at":"2025-06-30T00:32:52.272Z","avatar_url":"https://github.com/zoujiaqing.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QRPC\n\nA simple rpc framework that works over [QUIC](https://en.wikipedia.org/wiki/QUIC) written in Golang.\n\n## Client sample code\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/zoujiaqing/qrpc\"\n)\n\nfunc main() {\n\tclient := qrpc.NewClient(\"localhost\", 4444)\n\n\tif err := client.Connect(); err != nil {\n\t\treturn err\n\t}\n\n\tclient.OnRequest(func(data []byte) []byte {\n\t\treturn append([]byte(\"From Client Respond \"), data...)\n\t})\n\n\tvar i uint64 = 1\n\tfor {\n\t\tdata, err := client.Request([]byte(\"Hello\"))\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Request error: %v\", err)\n\t\t\tbreak\n\t\t}\n\t\tlog.Printf(\"Respond(%d): %s\", i, string(data))\n\t\ttime.Sleep(1 * time.Second)\n\t\ti++\n\t}\n}\n\n```\n\n## Server sample code\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/zoujiaqing/qrpc\"\n)\n\nfunc main() {\n\tserver, err := qrpc.NewServer(4444)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer func() { _ = server.Close() }()\n\n\tctx, cancel := context.WithCancel(context.Background())\n\tdefer cancel()\n\n\tserver.Accept(ctx)\n}\n\n```\n\n## Run examples\nexamples include grpc client and server sample code\n\n### Load dependency\n\n```bash\ngo mod dity\n```\n\n### Run server for example\n```bash\ngo run ./examples/server\n```\n\n### Run client for example\n```bash\ngo run ./examples/client\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoujiaqing%2Fqrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoujiaqing%2Fqrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoujiaqing%2Fqrpc/lists"}