Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@ironiumstudios/rpc-node
Advanced tools
Type-safe communication between message ports from Node.js worker_threads module
Type-safe communication between message ports from Node.js worker_threads module.
this project is licensed under the company wexond, i am only forking this project to modernize it and i wish for no trouble from the wexond devs or redbrick
$ npm install --save @ironiumstudios/rpc-node @ironiumstudios/rpc-core
Here's an example of communication from the main thread to a worker_thread
:
worker_thread
and the main thread, for example ping-pong.ts
:import { WorkerChannel } from '@ironiumstudios/rpc-node';
export interface PingPongService {
ping(): string;
}
export const pingPongChannel = new WorkerChannel<PingPongService>('ping-pong');
worker_thread
:import { RpcWorkerHandler } from '@ironiumstudios/rpc-node';
import { PingPongService, pingPongChannel } from './ping-pong';
class PingPongHandler implements RpcWorkerHandler<PingPongService> {
// Equivalent of |parentPort.on('message')|
ping(): string {
return 'pong';
}
}
// |parentPort| is the default value for the |messagePort| parameter in |getReceiver|.
pingPongChannel.getReceiver().handler = new PingPongHandler();
import { resolve } from 'path';
import { Worker } from 'worker_threads';
import { pingPongChannel } from './ping-pong';
const worker = new Worker('path/to/worker.js');
const pingPongService = pingPongChannel.getInvoker(worker);
(async () => {
console.log(await pingPongService.ping()); // Prints `pong`.
})();
WIP
FAQs
Type-safe communication between message ports from Node.js worker_threads module
The npm package @ironiumstudios/rpc-node receives a total of 133 weekly downloads. As such, @ironiumstudios/rpc-node popularity was classified as not popular.
We found that @ironiumstudios/rpc-node demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.