Skip to content

Instantly share code, notes, and snippets.

View eletroswing's full-sized avatar
🪐
Helloo!!!

Ytalo eletroswing

🪐
Helloo!!!
View GitHub Profile
@eletroswing
eletroswing / tcp.js
Created February 17, 2024 00:06
tcp abstration on nodejs
# By Fountai
const { TCP, constants } = process.binding("tcp_wrap");
const { EventEmitter } = require("events");
const { Socket: NTSocket } = require("net");
class Server extends EventEmitter {
constructor() {
super();
this._handle = null;
this._decoder = new TextDecoder();