JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q26206F
  • License ISC

a command line utility to echo TCP/UDP/HTTP messages

Package Exports

  • parakeet

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parakeet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

parakeet parakeet version License

unnamed package

Build Status Downloads Dependencies

screenshot

Demo

Watch the screencast here

Message Format

event format example
server start [TIME] ▶️ TYPE LISTEN_IP LISTEN_PORT [03:32:54 AM] ▶️ TCP 127.0.0.1 1338
connection open [TIME] ⚪ REMOTE_IP REMOTE_PORT [03:32:54 AM] ⚪️ TCP 127.0.1.1 1338
connection close [TIME] ⚫️️ REMOTE_IP REMOTE_PORT [03:32:54 AM] ⚫️️️ TCP 127.0.1.1 1338
data recieved [TIME] ✔ REMOTE_IP REMOTE_PORT [BYTES] "MESSAGE" [03:33:00 AM] ✔ (127.0.0.1 57619) [8] "hello!\r\n"
http signature (http only) [TIME] ✔ REMOTE_IP REMOTE_PORT HTTP_VERSION METHOD URL [03:32:33 AM] ✔ (127.0.0.1 49575) HTTP/1.1 POST /
http headers (http only) [TIME] ✔ REMOTE_IP REMOTE_PORT KEY: VALUE [03:32:33 AM] ✔ (127.0.0.1 49575) Host: localhost:8080 Content-Type: application/json

Sample Output

TCP
[03:32:54 AM] ▶️ TCP 127.0.0.1 1338
[03:32:57 AM] ⚪ (127.0.0.1 57619)
[03:33:00 AM] ✔ (127.0.0.1 57619) [8] "hello!\r\n"
[03:33:08 AM] ⚫️️️ (127.0.0.1 57619)
UDP
[03:32:41 AM] ▶️ UDP4 127.0.0.1 1337
[03:32:45 AM] ✔ (127.0.0.1 45464) [6] "hello\n"
[03:32:46 AM] ✔ (127.0.0.1 45464) [6] "world\n"
HTTP
[03:32:27 AM] ▶️ HTTP 127.0.0.1 8080
[03:32:31 AM] ⚪ (127.0.0.1 49574)
[03:32:31 AM] ✔ (127.0.0.1 49574) HTTP/1.1 POST /
[03:32:31 AM] ✔ (127.0.0.1 49574) Host: localhost:8080 Content-Length: 36 Content-Type: application/json; charset=utf-8 Accept-Encoding: gzip, deflate, compress Accept: application/json User-Agent: HTTPie/0.8.0
[03:32:31 AM] ✔ (127.0.0.1 49574) [36] {"name": "ahmad", "city": "toronto"}
[03:32:31 AM] ⚫️️️ (127.0.0.1 49574)

[03:32:33 AM] ⚪ (127.0.0.1 49575)
[03:32:33 AM] ✔ (127.0.0.1 49575) HTTP/1.1 POST /
[03:32:33 AM] ✔ (127.0.0.1 49575) Host: localhost:8080 Content-Length: 23 Content-Type: application/x-www-form-urlencoded; charset=utf-8 Accept-Encoding: gzip, deflate, compress Accept: */* User-Agent: HTTPie/0.8.0
[03:32:33 AM] ✔ (127.0.0.1 49575) [23] name=ahmad&city=toronto
[03:32:33 AM] ⚫️️️ (127.0.0.1 49575)

Install

npm install --save parakeet

Usage


  Usage: parakeet [options] [command]


  Commands:

    http   start HTTP echo server
    tcp    start TCP echo server
    udp    start UDP echo server

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -p, --port <number>      port to listen on
    -a, --address <address>  network address to listen on

License


©️ www.ahmadnassri.com  ·  License: ISC  ·  Github: @ahmadnassri  ·  Twitter: @ahmadnassri