Skip to content

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

Notifications You must be signed in to change notification settings

encendre/tcp-echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published