
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@codetheweb/recon
Advanced tools
Keep your network connections alive in node.js no matter what.
Recon looks like a regular tcp connection but it listens for disconnect events
and tries to re-establish the connection behind the scenes. While the connection
is down, write()
returns false
and the data gets buffered. When the
connection comes back up, recon emits a drain
event.
var recon = require('recon');
var conn = recon(ip, port);
conn.on('data', function (buf) {
var msg = buf.toString().trim()
console.log(msg);
});
Create a connection. The arguments can be specified in kwargs
or wherever in
arguments list and are optional except port.
retry
— Millisecond interval between reconnection retries.retryErrors
— An array of errors that will cause a reconnect. Default ['ECONNREFUSED']
.Like stream.write
, but buffers data while the module is reconnecting.
Terminate the connection (and don't reconnect).
Just like stream.
Emitted only the first time the connection is established.
Emitted each time the module establishes a connection after the first time.
Just like stream, unless err.code
is in the retryErrors
array, in which case the
error gets eaten and recon reconnects behind the scenes.
FAQs
Keep a network connection alive by reconnecting repeatedly
We found that @codetheweb/recon 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.