What is Peach
Installing
Tutorials
Methodology
Introduction
FAQ
Peach 3
Peach Pits
 General Conf
 Data Modeling
 State Modeling
 Agents
  Monitors
 Test
  Publishers
  Loggers
Running
Minset
Peach 2.3

License

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)

Actions

  • output — Send data to remote host

  • input — Receive data from remote host

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>