
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
quick-tcp-socket
Advanced tools
Simple wrapper for net.Socket to send/receive JSON objects and Buffer streams.
Simple wrapper for net.Socket to send/receive JSON objects and Buffer streams.
Made as much faster alternative to socket.io + socket.io-stream
$ npm install quick-tcp-socket
const {
TcpSocket, ReadBufferStream, WriteBufferStream
} = require('quick-tcp-socket');
//
// Client
//
let clientSocket = net.connect(port, host, () => {
client = new TcpSocket(false, clientSocket);
client.sendPacket("getData1", {
param1: 1,
});
client.once("setData1", (data) => {
// data == {a: 1, b: 2}
});
client.on('close', () => { //disconnected });
client.on('error', (err) => { console.error(err); });
let readStream = fs.createReadStream("file.txt");
client.sendPacketAndStreams("setStream1", {size: 100}, readStream);
});
//
// Server
//
net.createServer({}, (clientSocket) => {
let client = new TcpSocket(true, clientSocket);
client.on('getData1', (params) => {
// params.param1 == 1
client.sendPacket('setData1', {
a: 1, b: 2
});
});
client.on("setStream1", (data) => {
// data.size == 100
let writeStream = fs.createWriteStream("file.txt");
client.receiveStreams([writeStream], () => {
//stream received
});
});
client.on('close', () => { //client disconnected });
client.on('error', (err) => { console.error(err); });
});
todo...
FAQs
Simple wrapper for net.Socket to send/receive JSON objects and Buffer streams.
We found that quick-tcp-socket demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.