{"id":41648852,"url":"https://github.com/mushroomsir/socket","last_synced_at":"2026-01-24T15:41:03.695Z","repository":{"id":57607531,"uuid":"83415742","full_name":"mushroomsir/socket","owner":"mushroomsir","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-03T02:06:31.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T03:46:16.709Z","etag":null,"topics":["simple-api"],"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/mushroomsir.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":"2017-02-28T09:44:55.000Z","updated_at":"2024-06-20T03:46:16.710Z","dependencies_parsed_at":"2022-08-30T05:21:44.242Z","dependency_job_id":null,"html_url":"https://github.com/mushroomsir/socket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mushroomsir/socket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushroomsir%2Fsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushroomsir%2Fsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushroomsir%2Fsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushroomsir%2Fsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mushroomsir","download_url":"https://codeload.github.com/mushroomsir/socket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushroomsir%2Fsocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: 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":["simple-api"],"created_at":"2026-01-24T15:41:02.809Z","updated_at":"2026-01-24T15:41:03.690Z","avatar_url":"https://github.com/mushroomsir.png","language":"Go","readme":"# socket\n\n[![Build Status](https://travis-ci.org/mushroomsir/socket.svg?branch=master)](https://travis-ci.org/mushroomsir/socket)\n[![Coverage Status](http://img.shields.io/coveralls/mushroomsir/socket.svg?style=flat-square)](https://coveralls.io/r/mushroomsir/socket)\n[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/mushroomsir/socket/master/LICENSE)\n[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/mushroomsir/socket)\n\n## Installation and Usage\nInstall the package with:\n```go\ngo get github.com/mushroomsir/socket\n```\nImport it with:\n```go\nimport \"github.com/mushroomsir/socket\"\n```\nand use `socket` as the package name inside the code.\n## Features\n* Simple API: use it as an easy way to reuse socket(net.conn)\n* Socket support Ping() func\n\n## Example\n\n```go \n   // create a new socket pool with an initial capacity of 5 and maximum\n   // capacity of 30. The factory will create 5 initial connections and put it\n   // into the pool.\n   pool, err := socket.NewPool(1, 20, socket.NewFactory(address))\n   // now you can get a connection from the pool, if there is no connection\n   // available it will create a new one via the factory function.\n   socket, err := pool.Get()\n   // Ping to detect whether the socket is closed.\n   b, err := socket.Ping()\n\n   // close pool any time you want\n   pool.Close()\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushroomsir%2Fsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmushroomsir%2Fsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushroomsir%2Fsocket/lists"}