{"id":17458134,"url":"https://github.com/pocesar/node-packet-frame","last_synced_at":"2025-06-30T11:03:47.342Z","repository":{"id":14560184,"uuid":"17275918","full_name":"pocesar/node-packet-frame","owner":"pocesar","description":"Easy streaming packet framing and serialization","archived":false,"fork":false,"pushed_at":"2016-01-24T01:41:12.000Z","size":53,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T06:28:25.279Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pocesar.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}},"created_at":"2014-02-28T05:11:36.000Z","updated_at":"2016-01-15T01:19:40.000Z","dependencies_parsed_at":"2022-09-01T11:41:23.717Z","dependency_job_id":null,"html_url":"https://github.com/pocesar/node-packet-frame","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-packet-frame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-packet-frame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-packet-frame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-packet-frame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pocesar","download_url":"https://codeload.github.com/pocesar/node-packet-frame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811374,"owners_count":16884305,"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-10-18T03:55:12.337Z","updated_at":"2024-10-28T09:17:07.556Z","avatar_url":"https://github.com/pocesar.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/pocesar/node-packet-frame.png?branch=master)](https://travis-ci.org/pocesar/node-packet-frame)\r\n[![Coverage Status](https://coveralls.io/repos/pocesar/node-packet-frame/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/pocesar/node-packet-frame?branch=master)\r\n[![Dependency Status](https://david-dm.org/pocesar/node-packet-frame.svg?theme=shields.io)](https://david-dm.org/pocesar/node-packet-frame)\r\n\r\n[![NPM](https://nodei.co/npm/packet-frame.png?downloads=true\u0026stars=true)](https://nodei.co/npm/packet-frame/)\r\n\r\nPacket Frame\r\n===========\r\n\r\nEasy streaming packet framing and serialization.\r\n\r\n# Install\r\n\r\n```bash\r\nnpm install packet-frame\r\n```\r\n\r\n# What?\r\n\r\nFraming a packet means wrapping the payload with a header and checksums to ensure they are valid, and having it's size set.\r\n\r\nThe frames are limited to 65k (uint16), a \"magic\" version is added, along with CRC32 to the header and to the payload, recursively.\r\n\r\nYou can choose to drop invalid payloads, or deal with it manually.\r\n\r\n# How?\r\n\r\n```es6\r\nimport { Parser } from 'packet-frame'\r\n\r\nvar stream = Parser.createStream({\r\n    policy: 'drop' // default\r\n})\r\n\r\nnet.createServer((socket) =\u003e {\r\n    socket.pipe(stream).pipe(socket); // only the valid data is echoed back\r\n})\r\n```\r\n\r\n# License\r\n\r\nMIT","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Fnode-packet-frame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpocesar%2Fnode-packet-frame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Fnode-packet-frame/lists"}