TcpClient Publisher
The TcpClient publisher connects to a remote tcp service.
Parameters
-
Host — Hostname or IP address of remote host
-
Port — Destination port number
-
Timeout — How long to wait in milliseconds for data (optional, default 3,000)
-
ConnectTimeout — How long to wait in milliseconds for a new connection (optional, default 10,000)
Examples
Sending and receiving data
<DataModel name="TheDataModel"> <String name="value" length="4" /> </DataModel> <StateModel name="TheState"> <State name="initial"> <Action type="output"> <DataModel ref="TheDataModel"/> <Data> <Field name="value" value="mike" /> </Data> </Action> <!-- receive 4 bytes --> <Action type="input"> <DataModel ref="TheDataModel"/> </Action> </State> </StateModel> <Test name="Default"> <!-- ... --> <Publisher class="TcpClient"> <Param name="Host" value="127.0.0.1" /> <Param name="Port" value="8080" /> </Publisher> </Test>