{"id":19363103,"url":"https://github.com/gogf/greuse","last_synced_at":"2025-04-23T13:31:53.797Z","repository":{"id":57504047,"uuid":"176211889","full_name":"gogf/greuse","owner":"gogf","description":"Package greuse provides Listen and Dial functions that set socket options in order to be able to reuse ports. You should only use this package if you know what SO_REUSEADDR and SO_REUSEPORT are.","archived":false,"fork":false,"pushed_at":"2020-02-06T04:02:59.000Z","size":12,"stargazers_count":60,"open_issues_count":0,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-20T08:09:53.872Z","etag":null,"topics":["gf","goframe","reuseaddr","reuseport","tcp"],"latest_commit_sha":null,"homepage":"https://goframe.org","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/gogf.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":"2019-03-18T05:42:05.000Z","updated_at":"2024-08-23T08:26:52.000Z","dependencies_parsed_at":"2022-08-27T23:53:26.507Z","dependency_job_id":null,"html_url":"https://github.com/gogf/greuse","commit_stats":null,"previous_names":["gogf/greuseport"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogf%2Fgreuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogf%2Fgreuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogf%2Fgreuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gogf%2Fgreuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gogf","download_url":"https://codeload.github.com/gogf/greuse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250440092,"owners_count":21430950,"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":["gf","goframe","reuseaddr","reuseport","tcp"],"created_at":"2024-11-10T07:32:42.547Z","updated_at":"2025-04-23T13:31:53.511Z","avatar_url":"https://github.com/gogf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# greuse\n\nPackage greuse provides Listen and Dial functions that set socket options in order to be able to reuse ports. \nYou should only use this package if you know what SO_REUSEADDR and SO_REUSEPORT are.\n\n# Installation\n```\ngo get -u -v github.com/gogf/greuse\n```\nor use `go.mod`\n```\nrequire github.com/gogf/greuse latest\n```\n\n# Documentation\n\n* [https://godoc.org/github.com/gogf/greuse](https://godoc.org/github.com/gogf/greuse)\n\n# Quick Start\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/gogf/greuse\"\n    \"net/http\"\n    \"os\"\n)\n\n// We can create two processes with this code.\n// Do some requests, then watch the output of the console.\nfunc main() {\n    listener, err := greuse.Listen(\"tcp\", \":8881\")\n    if err != nil {\n        panic(err)\n    }\n    defer listener.Close()\n\n    server := \u0026http.Server{}\n    http.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n        fmt.Fprintf(w, \"gid: %d, pid: %d\\n\", os.Getgid(), os.Getpid())\n    })\n\n    panic(server.Serve(listener))\n}\n```\n\n\n# License\n\n`greuse` is licensed under the [MIT License](LICENSE), 100% free and open-source, forever.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgogf%2Fgreuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgogf%2Fgreuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgogf%2Fgreuse/lists"}