{"id":13624617,"url":"https://github.com/tj/punt","last_synced_at":"2025-04-07T11:09:20.859Z","repository":{"id":8469554,"uuid":"10068826","full_name":"tj/punt","owner":"tj","description":"Elegant UDP messaging for nodejs ","archived":false,"fork":false,"pushed_at":"2019-01-03T11:21:01.000Z","size":20,"stargazers_count":343,"open_issues_count":0,"forks_count":54,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-13T22:47:58.225Z","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/tj.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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-05-15T01:47:11.000Z","updated_at":"2024-03-22T18:58:10.000Z","dependencies_parsed_at":"2022-09-16T12:23:28.548Z","dependency_job_id":null,"html_url":"https://github.com/tj/punt","commit_stats":null,"previous_names":["visionmedia/punt"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fpunt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fpunt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fpunt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj%2Fpunt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tj","download_url":"https://codeload.github.com/tj/punt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640465,"owners_count":20971557,"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-08-01T21:01:44.316Z","updated_at":"2025-04-07T11:09:20.836Z","avatar_url":"https://github.com/tj.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n# Punt\n\n  A small layer on top of node's core __UDP__ module to make fast volatile messaging even simpler.\n  Punt uses the tiny [AMP](https://github.com/visionmedia/node-amp) prototol to serialize buffer, string,\n  and json arguments.\n\n## Installation\n\n```\n$ npm install punt\n```\n\n## Example\n\n  A small in-proc example of a server with three clients:\n\n```js\nvar punt = require('punt');\nvar server = punt.bind('0.0.0.0:5000');\nvar a = punt.connect('0.0.0.0:5000');\nvar b = punt.connect('0.0.0.0:5000');\nvar c = punt.connect('0.0.0.0:5000');\n\nserver.on('message', function(msg){\n  console.log(msg);\n});\n\nsetInterval(function(){\n  a.send({ hello: 'world' });\n}, 150);\n\nsetInterval(function(){\n  b.send('hello world');\n}, 150);\n\nsetInterval(function(){\n  c.send(Buffer.from('hello'));\n}, 150);\n```\n\n  yielding:\n\n```\n\u003cBuffer 68 65 6c 6c 6f\u003e\nhello world\n{ hello: 'world' }\n\u003cBuffer 68 65 6c 6c 6f\u003e\nhello world\n{ hello: 'world' }\n...\n```\n## API\n\n### Server(addr)\n\n  Bind to the given `addr`.\n\n### Client(addr)\n\n  Connect to the given `addr`.\n\n### Client#send(...)\n\n  Send one or more arguments a single atomic message. The following\n  types are supported through AMP:\n\n  - strings\n  - buffers\n  - objects (serialized as JSON)\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj%2Fpunt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftj%2Fpunt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj%2Fpunt/lists"}