0.1.8 • Published 9 years ago

rl-socket-client v0.1.8

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

rl-socket-client: the readline socket client

Build Status Coverage Status NPM

we ought to just pretend it stands for rocketlauncher-socket-client. that's way cooler, right?

this module was designed for apps that require a basic tty interface for socket programs - a tcp chat client, for instance. it affords tab-completion and a simple api.

api

  • #connect(): initiate a connection to the given host and port
  • #on(event): currently the only event emitted is connected
  • #write(text): programmatically send text over the wire

usage

var rlsc = require('rl-socket-client');

new rlsc({
    host: '192.168.128.100',
    port: 1829,
    prompt: '% ',
    lineEnding: '\n',
    connect: true,
    completions: ['ls', 'pwd', 'cat', 'echo']
});

// or

var client = new rlsc({
    host: '192.168.128.100',
    port: 1829
}).connect();

client.on('connected', function() {
    client.write('blah blah...');
});
0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.0

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago