{"id":22154165,"url":"https://github.com/ppeeou/ping-tcp-js","last_synced_at":"2025-08-23T01:10:36.210Z","repository":{"id":33978252,"uuid":"165085749","full_name":"ppeeou/ping-tcp-js","owner":"ppeeou","description":"ping","archived":false,"fork":false,"pushed_at":"2024-03-17T00:12:30.000Z","size":224,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T11:44:50.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ping-tcp-js","language":"TypeScript","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/ppeeou.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":"2019-01-10T15:40:12.000Z","updated_at":"2024-02-12T03:32:52.000Z","dependencies_parsed_at":"2024-06-19T00:25:32.791Z","dependency_job_id":"83f17c24-86bc-40fe-b342-f574fc7534aa","html_url":"https://github.com/ppeeou/ping-tcp-js","commit_stats":null,"previous_names":["ppeeou/ping--js"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ppeeou/ping-tcp-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppeeou%2Fping-tcp-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppeeou%2Fping-tcp-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppeeou%2Fping-tcp-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppeeou%2Fping-tcp-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppeeou","download_url":"https://codeload.github.com/ppeeou/ping-tcp-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppeeou%2Fping-tcp-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271727731,"owners_count":24810562,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-02T01:41:36.300Z","updated_at":"2025-08-23T01:10:36.178Z","avatar_url":"https://github.com/ppeeou.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to  👋\u003c/h1\u003e\n\n# install\n\n```\nnpm install ping-tcp-js\n```\n\n# ping\n\n- param\n\n```ts\nconst client = require(\"ping-tcp-js\");\n// or\nimport client from \"ping-tcp-js\";\n\nconst host = \"google.com\";\nconst port = 80;\n\nawait client.ping(\n  { host, port },\n  { timeout: 5000 } // optional\n);\n```\n\n1. host\n\n```ts\nconst client = require(\"ping-tcp-js\");\n// or\nimport client from \"ping-tcp-js\";\n\nconst host = \"google.com\";\nconst port = 80;\n\nclient\n  .ping({ host, port })\n  .then(() =\u003e console.log(\"connect ping\"))\n  .catch((e) =\u003e console.error(\"not disconnet\", e));\n```\n\n2. url\n\n```ts\nconst client = require(\"ping-tcp-js\");\n// or\nimport client from \"ping-tcp-js\";\n\nconst host = \"https://google.com\";\n\nclient\n  .ping({ host })\n  .then(() =\u003e console.log(\"connect ping\"))\n  .catch((e) =\u003e console.error(\"not disconnet\", e));\n```\n\n# pingBackOff\n\ntime : Reconnect time\ncount : Number of times\n\n- param\n\n```ts\nconst client = require(\"ping-tcp-js\");\n// or\nimport client from \"ping-tcp-js\";\n\nconst host = \"google.com\";\nconst port = 80;\n\n// or\nclient.pingBackOff({ host, port }, { time: 5000, count: 10, timeout: 5000 });\n```\n\n1. host\n\n```ts\nconst host = \"google.com\";\nconst port = 80;\n\nclient\n  .pingBackOff({ host, port }, { time: 5000, count: 10, timeout: 5000 })\n  .then(() =\u003e console.log(\"connect pingBackOff\"))\n  .catch((e) =\u003e console.error(\"not disconnet\", e));\n```\n\n2. url\n\n```ts\nconst host = \"https://google.com\";\nclient\n  .pingBackOff({ host: host }, { time: 5000, count: 10, timeout: 5000 })\n  .then(() =\u003e console.log(\"connect pingBackOff\"))\n  .catch((e) =\u003e console.error(\"not disconnet\", e));\n```\n\n## Test\n\n```ts\nnpm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppeeou%2Fping-tcp-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppeeou%2Fping-tcp-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppeeou%2Fping-tcp-js/lists"}