
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
@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
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.