rl-socket-client: the readline socket client
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 givenhost
andport
#on(event)
: currently the only event emitted isconnected
#write(text)
: programmatically sendtext
over the wire
usage
var rlsc = ; host: '192.168.128.100' port: 1829 prompt: '% ' lineEnding: '\n' connect: true completions: 'ls' 'pwd' 'cat' 'echo'; // or var client = host: '192.168.128.100' port: 1829; client;