node-thrift-protocol
An implementation of thrift-protocol with node.
Demo
let Thrift = ; /* Server */ let server = Thrift; /* Client */ let thrift = Thrift; thrift; thrift;
Usage
class Thrift extends stream.Duplex { ... }
This class is used to crate a thrift or local server.
Thrift.createServer([options]);
Creates a new server. The connectionListener argument is automatically set as a listener for the 'connection' event.
options
is an object as net.createServer in net module.
returns socket
.
Thrift.connect(options[, callback]);
Opens the connection for a given socket.
options
is an object as net.connect in net module.
return thrift
.
new Thrift(socket);
Construct a new thrift
object with a socket
.