OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

2.5.3 Sending and receiving messages

Messages can be sent and received between the CUP and MHP. The CUP issues the dc_clt_send_s function to send a message to the MHP, and issues the dc_clt_receive_s or dc_clt_receive2_s function to receive a message from the MHP. When the message assembly facility or message delivery confirmation facility is used, the CUP issues the dc_clt_assem_send_s function to send a message to the MHP, and issues the dc_clt_assem_receive_s function to receive a message from the MHP.

Before sending or receiving a message, the following must be specified in the client environment definition:

When the MHP type is server:
  • Specify the node name of the connection destination in DCSNDHOST.
  • Specify the port number (port number specified in the portno operand of the mcftalccn definition command in the MCF communication configuration definition) of the connection destination in DCSNDPORT.

When the MHP type is client:
Specify the CUP port number (port number specified in the oportno operand of the mcftalccn definition command in the MCF communication configuration definition) in DCRCVPORT.

It is also necessary to issue the dc_rpc_open_s function with DCCLT_SNDRCV specified in the flags.

In send-only or receive-only mode, messages are sent or received through independent connections. However, in send and receive mode, all messages are transmitted through the same connection.

The following figure shows the processing of sending and receiving a message.

Figure 2-21 Sending and receiving a message

[Figure]