tcp-echo

1.0.3 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i tcp-echo

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

1.68 kB

Total Files

5

Last publish

Collaborators

  • ence