0.0.7 • Published 4 years ago

siddhi-io-tcp-node v0.0.7

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

Siddhi IO TCP NODE

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

请作者喝杯咖啡。

paypal

Example

Siddhi script

@App:name("Example")
@App:description("Example Project")

@source(type = 'tcp', context = '/example', @map(type = 'json'))
define stream ExampleStream (hello string);

@sink(type = 'log', prefix = 'LOGGER-InsiderTrader')
define stream OutputStream(hello string);

@info(name = 'ExampleQuery')
from ExampleStream
insert into OutputStream;

Installation

npm i siddhi-io-tcp-node

or

yarn add siddhi-io-tcp-node

Usage

const { TCPNettyClient } = require("siddhi-io-tcp-node");

const client = new TCPNettyClient({
  keepAlive: true,
  noDelay: true,
});

await client.connect("127.0.0.1", 9892);

const context = "/example";
const payload = {
  hello: "world",
};

client.send(context, payload);

License

MIT

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago