{"id":30180990,"url":"https://github.com/streamich/socket.io-reqres","last_synced_at":"2025-10-23T21:02:23.682Z","repository":{"id":23496577,"uuid":"26862019","full_name":"streamich/socket.io-reqres","owner":"streamich","description":"Request/response for socket.io","archived":false,"fork":false,"pushed_at":"2018-01-05T09:30:16.000Z","size":3,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T07:17:55.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-19T13:13:50.000Z","updated_at":"2022-07-21T00:07:20.000Z","dependencies_parsed_at":"2022-07-23T22:46:11.714Z","dependency_job_id":null,"html_url":"https://github.com/streamich/socket.io-reqres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/streamich/socket.io-reqres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fsocket.io-reqres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fsocket.io-reqres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fsocket.io-reqres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fsocket.io-reqres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamich","download_url":"https://codeload.github.com/streamich/socket.io-reqres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fsocket.io-reqres/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270024697,"owners_count":24514054,"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-12T02:00:09.011Z","response_time":80,"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":"2025-08-12T08:06:25.207Z","updated_at":"2025-10-23T21:02:23.599Z","avatar_url":"https://github.com/streamich.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Request/response for socket.io\n\nEmulates request/response pattern in socket.io. You can also choose to make your Node.js app a client, and make browser a server.\n\nOn \"client\" side:\n\n```js\nvar Client = require(\"socket.io-reqres\").Client;\nvar client = new Client;\n\n// Where `socket` is socket.io socket object.\nclient.setSocket(socket);\n\nclient.request(\"myMethod\", \"Hello\", function(err, response) {\n    console.log(err, response);\n});\n```\n\nOn \"server\" side:\n\n```js\nvar Server = require(\"socket.io-reqres\").Server;\n\nvar server = new Server;\nserver.use(\"myMethod\", function(data, send) {\n    send(data + \" world\");\n});\n\n// Where `socket` is socket.io socket object.\nserver.setSocket(socket);\n```\n\n\n## API\n\n- `new Server(name)` - optional server name, defaults to `\"\"`.\n- `Server.setSocket(socket)` - set socket.io socket object.\n- `Server.use(method, callback)` - register RPC method.\n- `new Client(name, timeout)` - optional server name, defaults to `\"\"`. Optional timeout in ms.\n- `Client.setSocket(socket)` - set socket.io socket object.\n- `Client.request(method, data, callback)` - send request to the server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fsocket.io-reqres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamich%2Fsocket.io-reqres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fsocket.io-reqres/lists"}