{"id":19621567,"url":"https://github.com/pkg6/easy-rpc","last_synced_at":"2026-01-31T05:02:53.706Z","repository":{"id":267551162,"uuid":"901061966","full_name":"pkg6/easy-rpc","owner":"pkg6","description":"Implementing RPC in the simplest way possible","archived":false,"fork":false,"pushed_at":"2024-12-11T16:03:39.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T19:34:08.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/pkg6/easy-rpc","language":"PHP","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/pkg6.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,"zenodo":null}},"created_at":"2024-12-10T01:09:24.000Z","updated_at":"2024-12-11T16:00:00.000Z","dependencies_parsed_at":"2025-04-28T03:42:21.072Z","dependency_job_id":null,"html_url":"https://github.com/pkg6/easy-rpc","commit_stats":null,"previous_names":["pkg6/easy-rpc"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pkg6/easy-rpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkg6","download_url":"https://codeload.github.com/pkg6/easy-rpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg6%2Feasy-rpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28929865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"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":[],"created_at":"2024-11-11T11:23:33.883Z","updated_at":"2026-01-31T05:02:53.685Z","avatar_url":"https://github.com/pkg6.png","language":"PHP","readme":"## Installation\n\n~~~\ncomposer require pkg6/easy-rpc\n~~~\n\n## initialization\n\n### Server\n\n~~~\n$s = new Server();\n$s-\u003eaddCallback('add', function ($a, $b) {\n    return $a + $b;\n});\n$s-\u003estart();\n~~~\n\n### Client\n\n~~~\n$client = new Client();\n$client-\u003ewithURL(\"http://127.0.0.1:8000\");\n$add = $client-\u003eadd(1,2);\n~~~\n\n\u003e addObjectClass refer to：https://github.com/pkg6/easy-rpc/blob/main/tests/objects.php\n\n## Interfaces\n\n### Server Interface\n\n~~~\ninterface Server\n{\n    /**\n     * Callback binding:\n     * @param $method\n     * @param Closure $callback\n     * @return $this\n     */\n    public function addCallback($method, Closure $callback);\n\n    /**\n     * Class/Method binding:\n     * @param $objectOrClass\n     * @return $this\n     */\n    public function addObjectClass($objectOrClass);\n\n    /**\n     * List of users to allow\n     * @param array $authentications\n     * @return $this\n     */\n    public function withAuthentications(array $authentications);\n\n    /**\n     * IP client restrictions\n     * @param array $hosts\n     * @return $this\n     */\n    public function allowHosts(array $hosts);\n\n    /**\n     * @return mixed\n     */\n    public function start();\n}\n~~~\n\n### Client Interface\n\n~~~\ninterface Client\n{\n    /**\n     * @param $url\n     * @return $this\n     */\n    public function withURL($url);\n\n    /**\n     * @param $timeout\n     * @return $this\n     */\n    public function withTimeout($timeout);\n\n    /**\n     * @return $this\n     */\n    public function withDebug();\n\n    /**\n     * @param $username\n     * @param $password\n     * @return $this\n     */\n    public function withAuthentication($username, $password);\n\n    /**\n     * @param CHandle $handle\n     * @return $this\n     */\n    public function withHandle(CHandle $handle);\n}\n~~~\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Feasy-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkg6%2Feasy-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg6%2Feasy-rpc/lists"}