New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

echos

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echos

A simple echo server and client.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

echos Build Status

Echos is a simple echo server and client. More specifically, echos allows you to setup an echo server that will replay any text sent to it. Echos also comes with a client that allows you to send an echo request to a server, and it will print it back.

Installation

####Local

$ npm install echos

####Global

$ npm install -g echos

Usage – Command line

Server

Usage: ./echos server -p,--port <port> -q,--quiet
Usage: ./echos-server -p,--port <port> -q,--quiet

Options:
  -p, --port   [default: 1024]
  -q, --quiet  [default: false]

Client

Usage: ./echos client message -p,--port <port> -h,--host <host>
Usage: ./echos-client message -p,--port <port> -h,--host <host>

Options:
  -p, --port       [default: 1024]
  -h, --host       [default: "127.0.0.1"]
  -t, --timestamp  [default: false]

Example

Running the server on port 1337

$ ./bin/echos server -p 1337

Run the client to connect to the server on port 1337 and send Hello World!

$ ./bin/echos client Hello World! -p 1337 -t

When the server receives an echo request from the client it will log out something like this:

Echo message received:
    Hello World!
    From address: 127.0.0.1
    Time: Sat Jan 04 2014

After the client receives the echo response from the server it will log out something like this:

Hello World! time=7ms

Usage – As a module

Initialize

var echos = require('echos');

Create server

echos.server.start({port: 1337, quiet: false, callback: function(data){}});

Send echo from client

echos.client.echo('Hello World!', {port: 1337, timestamp: true, callback: function(data){}});

Run in development

Requirements

  1. Install node and npm
  2. Install grunt-cli - http://gruntjs.com/getting-started

Install package requirements

  1. Run npm install in the root of the repo

Watch for file changes, run grunt from the root of the repo. This will lint and run tests.

$ grunt watch

Run Tests

$ npm test

Keywords

FAQs

Package last updated on 05 Jan 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc