{"id":19572950,"url":"https://github.com/erickwendel/websockets-with-nodejs-from-scratch","last_synced_at":"2025-04-27T05:32:04.598Z","repository":{"id":49400877,"uuid":"517171203","full_name":"ErickWendel/websockets-with-nodejs-from-scratch","owner":"ErickWendel","description":"A complete application tutorial to show how to implement the Web Socket protocol using only Node.js builtin modules","archived":false,"fork":false,"pushed_at":"2022-07-25T03:23:32.000Z","size":16,"stargazers_count":75,"open_issues_count":0,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-15T04:12:33.173Z","etag":null,"topics":["binary","bitwise","howto","javascript","js","nodejs","protocol","raw-sockets","tutorial","vanilla-javascript","websocket"],"latest_commit_sha":null,"homepage":"https://youtu.be/qFoFKLI3O8w","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/ErickWendel.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":"2022-07-23T21:49:47.000Z","updated_at":"2024-03-09T14:52:30.000Z","dependencies_parsed_at":"2022-09-24T00:12:29.191Z","dependency_job_id":null,"html_url":"https://github.com/ErickWendel/websockets-with-nodejs-from-scratch","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/ErickWendel%2Fwebsockets-with-nodejs-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fwebsockets-with-nodejs-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fwebsockets-with-nodejs-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErickWendel%2Fwebsockets-with-nodejs-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErickWendel","download_url":"https://codeload.github.com/ErickWendel/websockets-with-nodejs-from-scratch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224060486,"owners_count":17249035,"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":["binary","bitwise","howto","javascript","js","nodejs","protocol","raw-sockets","tutorial","vanilla-javascript","websocket"],"created_at":"2024-11-11T06:31:04.102Z","updated_at":"2024-11-11T06:31:23.575Z","avatar_url":"https://github.com/ErickWendel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Socket application using only Node.js built-in modules\r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/8060102/180692620-543a0a99-1733-454c-b202-9f8f4702816c.png\" width=800/\u003e\r\n\r\n## About\r\nWelcome, this repo is part of my youtube video about Building a complete application implementing the Web Socket protocol using only Node.js built-in modules. \r\n\r\nFirst of all, leave your star 🌟 on this repo.\r\n\r\nAccess our [**exclusive telegram channel**](https://bit.ly/ErickWendelContentHub) so I'll let you know about all the content I've been producing \r\n\r\n## Complete source code\r\n- Access them in [nodejs-raw-websocket/](./nodejs-raw-websocket/)\r\n\r\n## Features Checklist + Challenges\r\n\r\n- Web Socket Server\r\n    - Receiving data\r\n      - [x] Establishes handshake connections according to the Web Socket protocol\r\n      - [x] Receives masked data payloads\r\n      - [x] Decodes 7-bits long data payloads \r\n      - [x] Decodes 16-bits long data payloads \r\n      - [ ] Decodes 64-bits long data payloads \r\n    - Replying\r\n      - [x] Builds data frames according to the Web Socket protocol\r\n      - [x] Sends 7-bits long unmasked data payloads\r\n      - [x] Sends 16-bits long unmasked data payloads\r\n      - [ ] Sends 64-bits long unmasked data payloads\r\n\r\n- Web Socket Client\r\n  - [x] Establishes handshake connections according to the Web Socket protocol\r\n  - [x] Sends masked data payloads\r\n  - [x] Receives masked and unmasked data payloads\r\n  - [ ] Tries reconnecting to the server after a disconnection\r\n\r\n### Notes\r\n- Should you have some difficulties solving the problems, please comment on the [**Youtube video**](https://youtu.be/qFoFKLI3O8w)\r\n\r\n- As soon as you've been finishing the tasks, comment on the  [**Youtube video**](https://youtu.be/qFoFKLI3O8w) so all other students can be pushed forward by your efforts\r\n\r\n## Running\r\n\r\n- Server - Use the Node.js v18 and execute the [server.mjs](./nodejs-raw-websocket/server.mjs) file as `node nodejs-raw-websocket/server.mjs`\r\n- Client - You just need to open the [index.html](./nodejs-raw-websocket/index.html) file on a browser. (I use Firefox for the examples) \r\n\r\n## Have fun!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickwendel%2Fwebsockets-with-nodejs-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferickwendel%2Fwebsockets-with-nodejs-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferickwendel%2Fwebsockets-with-nodejs-from-scratch/lists"}