The TCP socket input starts a workflow, by reading from a specific raw TCP IP port. InterformNG2 reads from the port you select and reads the bytes exactly as they are sent and pass them on to the workflow payload.
Use it when a sending system or hardware can only write to a network port — for example, an old ERP system or a printer driver configured as a network printer.
Setup:
Select TCP socket input as the workflow input
- Input type:
This is the type of data the port receives. This is used for setting which workflow components that should be able for usage afterwards. - Socket port:
This is the port the socket input will listen on. The default port is 9100. - Write reply:
When selected, the connection stays open until the workflow has finished and the resulting payload is sent back. If not selected, the connection is closed when the data is received.
Limitations
One port can only be used by one workflow, this includes for all tenants.
Example
The following Powershell program will send a PDF to the socket 9100 on the local machine (Any file can be sent)
$client = New-Object System.Net.Sockets.TcpClient('127.0.0.1', 9100)
$stream = $client.GetStream()
$bytes = [System.IO.File]::ReadAllBytes('C:\testFiles\testDocument.pdf')
$stream.Write($bytes, 0, $bytes.Length)
$stream.Flush()
$stream.Close()
$client.Close()