Skip to content

ygmpkk/siddhi-io-tcp-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Siddhi IO TCP NODE

Donation

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

请作者喝杯咖啡。

paypal wechat alipay

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published