Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ataraxia-local
Advanced tools
Machine-local transport for Ataraxia. This transport connects together instances on the same machine via a Unix socket.
npm install --save ataraxia-local
To use only the machine-local transport:
import { Network, AnonymousAuth } from 'ataraxia';
import { MachineLocalTransport } from 'ataraxia-local';
// Setup a network
const net = new Network({
name: 'name-of-your-app-or-network',
transports: [
new MachineLocalTransport()
]
});
await net.join();
onLeader
can be used to start a secondary network transport that
will handle connections to other machines:
import { Network, AnonymousAuth } from 'ataraxia';
import { TCPTransport, TCPPeerMDNSDiscovery } from 'ataraxia-tcp';
import { MachineLocalTransport } from 'ataraxia-local';
// Setup a network
const net = new Network({
name: 'name-of-your-app-or-network',
});
net.addTransport(new MachineLocalTransport({
onLeader: () => {
/*
* The leader event is emitted when this instance becomes the leader
* of the machine-local network. This instance will now handle
* connections to other machines in the network.
*/
net.addTransport(new TCPTransport({
discovery: new TCPPeerMDNSDiscovery(),
authentication: [
new AnonymousAuth()
]
}));
}
});
await net.join();
new MachineLocalTransport(options)
Create a new instance of the transport.
options
path?: string
, path of the local socket. If not specified the transport
defaults to creating a socket in the temporary directory of the system
using the name of the network.onLeader?: () => void
, function that will be run if this instance
becomes the leader of the local network.onLeader(callback: () => void)
Event emitted if this transport becomes the leader of the local network.
FAQs
Machine-local transport for Ataraxia P2P messaging
The npm package ataraxia-local receives a total of 10 weekly downloads. As such, ataraxia-local popularity was classified as not popular.
We found that ataraxia-local 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.