This commit is contained in:
Joel Wetzell
2026-05-17 21:12:04 -05:00
parent 69bc31d3f1
commit 8e6cd58006
82 changed files with 642 additions and 450 deletions
+14 -12
View File
@@ -1,25 +1,27 @@
---
title: TCP Client
sidebar:
label: Client
order: 1
label: Client
order: 1
---
The `net.tcp.client` module connects to TCP server and emits messages based on the data it receives from the server that it connects to. Messages are determined by "framing" techniques as TCP is a stream based protocol. The module will attempt to reconnect anytime the connection is closed.
- **type**: `net.tcp.client`
- **params**:
- **host**: IP or FQDN to connect to
- **port**: TCP port to connect to
- **framing**: how to chunk the TCP stream into "messages"
- LF `\n`
- CR `\r`
- CRLF `\r\n`
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
- RAW (no framing is done bytes are sent out as they are received)
- **host**: IP or FQDN to connect to
- **port**: TCP port to connect to
- **framing**: how to chunk the TCP stream into "messages"
- LF `\n`
- CR `\r`
- CRLF `\r\n`
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
- RAW (no framing is done bytes are sent out as they are received)
### Example
Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split on line-feed (`\n`)
```yaml
- id: tcpClient
type: net.tcp.client
@@ -27,4 +29,4 @@ Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split
host: 127.0.0.1
port: 8888
framing: LF
```
```