A complete application tutorial to show how to implement the Web Socket protocol using only Node.js builtin modules

Overview

Web Socket application using only Node.js built-in modules

About

Welcome, 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.

First of all, leave your star ๐ŸŒŸ on this repo.

Access our exclusive telegram channel so I'll let you know about all the content I've been producing

Complete source code

Features Checklist + Challenges

  • Web Socket Server

    • Receiving data
      • Establishes handshake connections according to the Web Socket protocol
      • Receives masked data payloads
      • Decodes 7-bits long data payloads
      • Decodes 16-bits long data payloads
      • Decodes 64-bits long data payloads
    • Replying
      • Builds data frames according to the Web Socket protocol
      • Sends 7-bits long unmasked data payloads
      • Sends 16-bits long unmasked data payloads
      • Sends 64-bits long unmasked data payloads
  • Web Socket Client

    • Establishes handshake connections according to the Web Socket protocol
    • Sends masked data payloads
    • Receives masked and unmasked data payloads
    • Tries reconnecting to the server after a disconnection

Notes

  • Should you have some difficulties solving the problems, please comment on the Youtube video

  • As soon as you've been finishing the tasks, comment on the Youtube video so all other students can be pushed forward by your efforts

Running

  • Server - Use the Node.js v18 and execute the server.mjs file as node nodejs-raw-websocket/server.mjs
  • Client - You just need to open the index.html file on a browser. (I use Firefox for the examples)

Have fun!

You might also like...

๐ŸŒˆ GitHub following, followers, only-following, only-follower tracker ๐ŸŒˆ

๐ŸŒˆ GitHub following, followers, only-following, only-follower tracker ๐ŸŒˆ

github-following-tracker GitHub following, followers, only-following, only-follower tracker ๐Ÿ‘€ Just enter your GitHub name and track your followings!

Jun 15, 2022

Node.js implementation of the Socket SDK client

SYNOPSIS A Node.js adapter for the Socket SDK DESCRIPTION Socket SDK uses a simple uri-based protocol for brokering messages between the render proces

Dec 28, 2022

Simple google docs thing in Remix using socket.io.

This is just a simple google docs thing, me playing around with Remix and sockets. TODO: from socket.io to yjs sockets, support CRDT. Installation Aft

Apr 19, 2022

Leader Board is a simple project based on JavaScript programing language. The purpose of this project is to work with APIs and ASYNC & AWAIT methods. I have used vanilla JavaScript with web pack to implement this project

Leader Board is a simple project based on JavaScript programing language. The purpose of this project is to work with APIs and ASYNC & AWAIT methods. I have used vanilla JavaScript with web pack to implement this project

Leader Board - JavaScript Project Table of contents Overview The challenge Screenshot Links Project Setup commands My process Built with What I learne

Oct 21, 2022

An Electron app using NAPI-RS and a native Rust module to implement a Svelte store.

Svelte Store Written in Rust This repo shows a demo of an Electron app running a Svelte UI that reads and writes a Svelte store, but with a twist: the

Sep 20, 2022

How to implement Step-up Authentication using Amazon Cognito

How to implement Step-up Authentication using Amazon Cognito

How to implement Step-up Authentication using Amazon Cognito This repository contains accompanying source code for the AWS Blog post, How to implement

Dec 15, 2022

Interface to implement a video player using the Bootstrap 5 framework.

BOOTSTRAP VIDEO PLAYER INTERFACE This is an experimental interface to implement a video player using the Bootstrap 5 framework. The HTML structure was

Dec 28, 2022

A utility package to help implement stateless CSRF protection using the Double Submit Cookie Pattern in express.

Double CSRF A utility package to help implement stateless CSRF protection using the Double Submit Cookie Pattern in express. Dos and Don'ts โ€ข Getting

Dec 28, 2022

A quotaless, partially limitless, and fast Node.js Multiplayer Piano server implementation that efficiently makes use of the protocol and uWebSockets.js

speedymppserver A quotaless, partially limitless, and fast Node.js Multiplayer Piano server implementation that efficiently makes use of the protocol

Oct 14, 2022
Owner
Erick Wendel
Entrepreneur, Professional Instructor, Microsoft MVP, Google Dev Expert , @nodejs collaborator, Keynote Speaker ๐Ÿ‡ง๐Ÿ‡ท @nodebr @nodeschool
Erick Wendel
This repository is for a tutorial on how to implement ci-cd in django using AWS

AWS CI/CD DJANGO Overview This repository is for a tutorial on how to implement Django CI/CD Pipeline in AWS. It contains important scripts needed to

Somtochukwu 8 Aug 19, 2022
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
This project is based on the Awesome Books app repo, refactored with ES6 and organized with modules. The purpose of this project is to learn functionality organization using JavaScript modules.

Awesome Books with ES6 and modules A basic app project built with HTML, CSS and JS ES6 to keep track of awesome books. Built With HTML/CSS and JS best

Karla Delgado 10 Aug 27, 2022
TVMAZE API-based webapp, receives TV show episodes with all data about that TV show.

TVMAZE API-based webapp, receives TV show episodes with all data about that TV show. The Webapp has two interfaces: A home page, showing a list of Tv show episodes you can like. And a popup window with more data about the TV show that you can comment on.

Yasin Warsame 4 Aug 9, 2022
A chat application made using Next.js and Socket.io.

Chat App Login Page Create Room Default Room Protected Room Demo Getting Started ?? Development Server npm install --s --f && npm run dev # or yarn in

null 12 Dec 28, 2022
I built a full-stack project using Node, Express, Mongo, webRTC, socket.io, and of course React JS. This project is inspired by the awesome Clubhouse ๐Ÿ˜Š

codershouse-mern - This Project is Under Development. Below are some of the implemented interface and the remaining features will be updated in future

Bishal Das 35 Nov 18, 2022
a chatt app build using node , express and socket IO , it has many rooms

RealTime-chatt-app you can view the app here : https://bit.ly/3zce4ON a chatt app build using node , express and socket IO . used to public chatt room

null 11 Aug 31, 2022
This project is about building a web application to show a weather forecast using weather API.

Weather App Web application to show the current and upcoming week weather forecast. Want to see live preview ยป โœง View Demo โœง Report Bug โœง Getting Star

Mohit Sehrawat 10 Dec 25, 2022