{"id":20428912,"url":"https://github.com/ppmathis/iowamp","last_synced_at":"2025-10-08T04:56:58.148Z","repository":{"id":6736068,"uuid":"7982145","full_name":"ppmathis/iowamp","owner":"ppmathis","description":"WAMP™ server in NodeJS","archived":false,"fork":false,"pushed_at":"2013-02-02T22:06:52.000Z","size":124,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-22T07:02:44.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ppmathis.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":"2013-02-02T21:27:35.000Z","updated_at":"2017-11-20T22:34:48.000Z","dependencies_parsed_at":"2022-08-24T18:01:20.557Z","dependency_job_id":null,"html_url":"https://github.com/ppmathis/iowamp","commit_stats":null,"previous_names":["neoxid/iowamp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ppmathis/iowamp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fiowamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fiowamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fiowamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fiowamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppmathis","download_url":"https://codeload.github.com/ppmathis/iowamp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppmathis%2Fiowamp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891747,"owners_count":26063856,"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-10-08T02:00:06.501Z","response_time":56,"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-11-15T07:29:25.338Z","updated_at":"2025-10-08T04:56:58.126Z","avatar_url":"https://github.com/ppmathis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iowamp #\r\n\r\niowamp is a WAMP™ server in NodeJS. Currently it only supports basic RPC calls, but pub/sub support is coming.\r\nIt attaches to [WebSocket.IO](http://github.com/learnboost/websocket.io).\r\n\r\n## What is WAMP™? ##\r\n[WebSocket Application Messaging Protocol (WAMP)](http://www.tavendo.de/autobahn/protocol.html) is a protocol for RPC \u0026 PubSub support, based on WebSockets. Technically, WAMP is an officially registered WebSocket subprotocol proposed by Tavendo.\r\n\r\n## License ##\r\nApache License (version 2)\r\n\r\n## Prerequisites ##\r\niowamp itselfs requires version 0.6.x of NodeJS or higher. If you want to run the tests, you'll want Vows.\r\nTo really use iowamp, you will also need [WebSocket.IO](http://github.com/learnboost/websocket.io).\r\n\r\n## Installing with [NPM](http://npmjs.org) ##\r\n```\r\nnpm install iowamp\r\n```\r\n\r\n## Attach iowamp to a websocket.io server ##\r\nBefore you can start using iowamp in your project, you need to attach it to an websocket.io instance of your choice:\r\n\r\n```javascript\r\nvar iowamp = require('./lib'),\r\n    wsio = require('websocket.io');\r\n\r\nvar server = wsio.listen(8000);\r\nvar app = iowamp.attach(server);\r\n```\r\n\r\n## Register a RPC class with methods ##\r\nRegistering a RPC class with some methods is also easy - here is an example for it:\r\n\r\n```javascript\r\nvar iowamp = require('./lib'),\r\n    wsio = require('websocket.io');\r\n\r\nvar server = wsio.listen(8000);\r\nvar app = iowamp.attach(server);\r\n\r\napp.rpc('http://example.com/calc#', function() {\r\n    this.register('add', function(cb, a, b) {\r\n        cb(null, a + b);\r\n    });\r\n});\r\n```\r\n\r\nThe code should be kinda self-explanatory, allthough here is some additional information:\r\n\r\n**app.rpc(baseURI, constructor)** registers a new RPC class\r\n\r\n- *baseURI* The base URI for the class. It must be a complete URI and it should end with a #. (A CURIE / compact URI is not allowed)\r\n- *constructor* Should be a function which registers some RPC methods (will get called in the iowamp scope)\r\n\r\n**this.register(name, method)**\r\n\r\n- *name* The name of the method. To call the method in a WAMP client, you would need to specifiy the baseURI and the method name like here: http://example.com/calc#add\r\n- *method* The method which should be called. The first parameter is always the callback function, followed by the arguments passed from the WAMP client.\r\n\r\n**cb(error, result)** Kinda self-explanatory. If an error will be passed, a generic error will be send back to the WAMP client. If not, the result will be send back.\r\n\r\n## Catching unknown methods ##\r\nIf you want to catch methods which are unknown / not declared, you can listen for the *unknownCall* event:\r\n\r\n```javascript\r\napp.on('unknownCall', function(baseURI, method, callback, args...) {\r\n// Your code goes here\r\n});\r\n```\r\n\r\n- - -\r\niowamp NodeJS WAMP™ server - © 2012-2013 P. Mathis (dev@snapserv.net)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppmathis%2Fiowamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppmathis%2Fiowamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppmathis%2Fiowamp/lists"}