{"id":19892580,"url":"https://github.com/compscidr/libdetect","last_synced_at":"2025-05-02T18:31:47.294Z","repository":{"id":42521223,"uuid":"153376381","full_name":"compscidr/libdetect","owner":"compscidr","description":"Performs detection of open TCP ports on the local networks that a particular device is connected to.","archived":false,"fork":false,"pushed_at":"2025-04-14T18:32:23.000Z","size":577,"stargazers_count":1,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T19:29:43.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compscidr.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":"2018-10-17T01:17:38.000Z","updated_at":"2025-04-09T15:39:36.000Z","dependencies_parsed_at":"2023-02-05T06:01:51.960Z","dependency_job_id":"27e604b0-5df2-4cba-abcd-970522858e44","html_url":"https://github.com/compscidr/libdetect","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Flibdetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Flibdetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Flibdetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Flibdetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compscidr","download_url":"https://codeload.github.com/compscidr/libdetect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252088590,"owners_count":21692824,"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":[],"created_at":"2024-11-12T18:24:16.088Z","updated_at":"2025-05-02T18:31:44.033Z","avatar_url":"https://github.com/compscidr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libdetect\n[![](https://jitpack.io/v/RightMesh/librxbus.svg)](https://jitpack.io/#compscidr/libdetect)\n\nPerforms detection of open TCP ports on the local networks that a particular device is connected to.\n\nYou can use this library\nin your project with gradle using jitpack:\n\n```java\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n```\n\n```java\ndependencies {\n   implementation 'com.github.compscidr:libdetect:v1.0'\n}\n```\n\n# Features\n* Can monitor multiple TCP ports with subsequent calls to start(port) function.\n* Supports callbacks for the following two events:\n  * PeerReachable events generated when a peer becomes reachable on the local network with the specified TCP port.\n  * PeerUnreachable events generated when a previously reachable peer is no longer reachable with the specified TCP port.\n\n## Register for TCP peer discovery:\nFor example let's suppose we wish to have events generated for any port 80 tcp servers running on all local networks:\n```\nLibDetect test = new LibDetect();\n\ntest.start(80, new ActionListener() {\n    @Override\n    public void onPeerReachable(PeerReachable peer) {\n        System.out.println(\"PEER REACHABLE on \" + peer.address.getHostAddress() + \" port: \" + 80);\n    }\n\n    @Override\n    public void onPeerUnreachable(PeerUnreachable peer) {\n        System.out.println(\"PEER UNREACHABLE on \" + peer.address.getHostAddress() + \" port: \" + 80);\n    }\n}, false);\n```\n\n## Cleanup (stop listening for peer discovery events)\n```\ntest.stop(80);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Flibdetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompscidr%2Flibdetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Flibdetect/lists"}