Send fixed-size data to
a TCP/IP client connection and receive fixed-size data back on the
same connection (asynchronously), by the use of a message flow with MQInput, TCPIPClientOutput, TCPIPClientInput, and MQOutput nodes.
About this task
Scenario: An application sends asynchronous data
between TCP/IP client connections.
Instructions: The
following steps describe how to create a message flow to send data
through a client connection and wait on the same connection for a
reply to be returned. The request is performed asynchronously in two
different flows (the TCPIPClientInput does not wait
for data to be returned on this connection, but instead monitors all
available connections).
Procedure
- Create a message flow called TCPIP_Task7 with
an MQInput node, a TCPIPClientOutput node, a TCPIPClientInput node, and
an MQOutput node.
- Connect the Out terminal of the MQInput node to the In terminal
of the TCPIPClientOutput node.
- Connect the Out terminal of the TCPIPClientInput node to the
In terminal of the MQOutput node.
- On the MQInput node,
set the Queue name property
(on the Basic tab) to TCPIP.TASK7.IN1.
- Set the following properties of the TCPIPClientOutput node:
- On the Basic tab, set the Connection details property to 14147.
- On the Advanced tab, set the Output stream modification property
to Reserve output stream.
- On the Records and elements tab,
set the following properties:
- Set the Record definition property
to Fixed length.
- Set the Length property
to 100.
- Set the following properties of the TCPIPClientInput node:
- On the Basic tab, set the Connection details property to 14147.
- On the Advanced tab, set the Output stream modification property
to Release output stream and reset
Reply ID.
- On the Records and elements tab,
set the following properties:
- Set the Record detection property
to Fixed length.
- Set the Length property
to 100.
- On the MQOutput node,
set the Queue name property
(on the Basic tab) to TCPIP.TASK7.OUT1.
- Save the message flow.