🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

tcp-echo

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tcp-echo

A simple module npm to run a tcp server that sends back what is sent to it

1.0.3
latest
Source
npm
Version published
Maintainers
1
Created
Source

tcp-echo

receives what you send

usage

cli

npx tcp-echo
npx tcp-echo -h

node

npm i tcp-echo
const createEchoServer = require('tcp-echo')

// options are passed to constructor net.Server(options)
// echo is the tcp server returned
const echoServer = createEchoServer(options)

const port = 1234

echoServer.on('connection', socket => {
  console.log(`New connection from ${socket.address().address}`)
})

echoServer.listen(port)

Keywords

cli

FAQs

Package last updated on 18 Nov 2019

Did you know?

Socket

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.

Install

Related posts