{"id":17470780,"url":"https://github.com/matsumotory/mruby-fast-remote-check","last_synced_at":"2026-03-17T23:07:19.922Z","repository":{"id":140250120,"uuid":"82250290","full_name":"matsumotory/mruby-fast-remote-check","owner":"matsumotory","description":"FastRemoteCheck can perform port listening check at high speed using raw socket","archived":false,"fork":false,"pushed_at":"2018-06-09T14:14:25.000Z","size":32,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T08:51:58.957Z","etag":null,"topics":["mruby","socket","tcp"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matsumotory.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}},"created_at":"2017-02-17T02:53:12.000Z","updated_at":"2020-08-06T09:35:52.000Z","dependencies_parsed_at":"2024-02-04T21:09:04.223Z","dependency_job_id":"288390a3-2fc5-4681-b14b-7ecece6372d1","html_url":"https://github.com/matsumotory/mruby-fast-remote-check","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matsumotory/mruby-fast-remote-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-fast-remote-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-fast-remote-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-fast-remote-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-fast-remote-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsumotory","download_url":"https://codeload.github.com/matsumotory/mruby-fast-remote-check/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmruby-fast-remote-check/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"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":["mruby","socket","tcp"],"created_at":"2024-10-18T16:10:08.980Z","updated_at":"2026-03-17T23:07:19.878Z","avatar_url":"https://github.com/matsumotory.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mruby-fast-remote-check   [![Build Status](https://travis-ci.org/matsumotory/mruby-fast-remote-check.svg?branch=master)](https://travis-ci.org/matsumotory/mruby-fast-remote-check)\n\nFastRemoteCheck can perform port listening check at high speed using raw socket.\n\n## install by mrbgems\n- add conf.gem line to `build_config.rb`\n\n```ruby\nMRuby::Build.new do |conf|\n\n    # ... (snip) ...\n\n    conf.gem :mgem =\u003e 'mruby-fast-remote-check'\nend\n```\n\n## benchmark\n\n`f.ready? :raw` used RAW socket via my user TCP stack using 3 packets. This is very fast.\n\n`f.ready? :connect` used `connect(2)` and SO_LINGER `close(2)` via Kernel TCP stack using 4 packets.\n\n\n#### 6379 port listeing\n\n```\n\u003e f = FastRemoteCheck.new(\"127.0.0.1\", 54321, \"127.0.0.1\", 6379, 3)\n =\u003e #\u003cFastRemoteCheck:0x139f840\u003e\n\u003e a = Time.now; 100000.times {f.ready? :connect}; (Time.now - a).to_f\n =\u003e 3.78796\n\u003e a = Time.now; 100000.times {f.ready? :raw}; (Time.now - a).to_f\n =\u003e 1.066795\n```\n\n#### 6380 port not listeing\n\n```\n\u003e f = FastRemoteCheck.new(\"127.0.0.1\", 54321, \"127.0.0.1\", 6380, 3)\n =\u003e #\u003cFastRemoteCheck:0x139f4b0\u003e\n\u003e a = Time.now; 100000.times {f.ready? :connect}; (Time.now - a).to_f\n =\u003e 1.037658\n\u003e a = Time.now; 100000.times {f.ready? :raw}; (Time.now - a).to_f\n =\u003e 0.620506\n```\n\n## example\n\n### Listeing check\n\n```ruby\n\u003e f = FastRemoteCheck.new(\"127.0.0.1\", 54321, \"127.0.0.1\", 6379, 3)\n =\u003e #\u003cFastRemoteCheck:0x139d560\u003e\n\u003e f.open_raw?\n =\u003e true\n\u003e f.ready?(:raw) # alias f.open_raw?\n =\u003e true\n\u003e f.connectable?\n =\u003e true\n\u003e f.ready?(:connect) # alias f.connectable?\n =\u003e true\n\u003e f = FastRemoteCheck.new(\"127.0.0.1\", 54321, \"127.0.0.1\", 6378, 3)\n =\u003e #\u003cFastRemoteCheck:0x139d2c0\u003e\n\u003e f.open_raw?\n =\u003e false\n\u003e f.connectable?\n =\u003e false\n\u003e f = FastRemoteCheck.new(\"127.0.0.1\", 54321, \"1.1.1.1\", 6378, 3)\n =\u003e #\u003cFastRemoteCheck:0x139cae0\u003e\n\u003e f.open_raw?\n(mirb):8: sys failed. errno: 11 message: Resource temporarily unavailable mrbgem message: recvfrom failed (RuntimeError)\n\u003e f.connectable?\n(mirb):9: sys failed. errno: 115 message: Operation now in progress mrbgem message: connect failed (RuntimeError)\n\u003e\n```\n\n### ICMP check\n\n```ruby\n\u003e FastRemoteCheck::ICMP.new(\"8.8.8.8\", 3).ping?\n =\u003e true\n\u003e FastRemoteCheck::ICMP.new(\"8.8.8.9\", 3).ping?\n(mirb):4: sys failed. errno: 11 message: Resource temporarily unavailable mrbgem message: recv failed (RuntimeError)\n\u003e\n```\n\n## License\nunder the MIT License:\n- see LICENSE file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmruby-fast-remote-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsumotory%2Fmruby-fast-remote-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmruby-fast-remote-check/lists"}