mole-rpc-transport-tcp
TypeScript icon, indicating that this package has built-in type declarations

0.0.20210205 • Public • Published

mole-rpc-transport-tcp

Build Status NPM Release Libraries.io dependency status

TCP transport for mole-rpc.

const MoleClient = require("mole-rpc/MoleClient.js");
const MoleServer = require("mole-rpc/MoleServer.js");
const { TcpTransportClient, TcpTransportServer } = require("node-mole-rpc-transport-tcp");

// create client transport
const clientTransport = new TcpTransportClient({ host: "192.0.2.1", port: 6653 });
// create client
const client = new MoleClient({ transport: clientTransport });
// close client transport
clientTransport.close();

// create server transport
const serverTransport = new TcpTransportServer({ port: 6653 });
// create server
const server = new MoleServer({ transports: [serverTransport] });
// close server transport
await serverTransport.close();

Package Sidebar

Install

npm i mole-rpc-transport-tcp

Weekly Downloads

17

Version

0.0.20210205

License

ISC

Unpacked Size

7.58 kB

Total Files

9

Last publish

Collaborators

  • yoursunny