OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/J

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

2.4.4 Received message assembly facility

The received message assembly facility carries out TCP/IP communication using the first 4 bytes of a sent or received message as the message length area. If you use this facility when the remote system is using the TP1/NET/TCP/IP received message assembly facility, you can perform communication without being concerned about the message length area in a CUP.

Organization of this subsection
(1) Sending messages
(2) Receiving messages

(1) Sending messages

When a CUP uses the cltAssemSend method to send a message, TP1/Client/J adds a 4-byte message length area to the beginning of the message and sends it to the remote system. The message length added by TP1/Client/J is set as the network byte order. To use the cltAssemSend method, specify either DCCLT_ONEWAY_SND or DCCLT_SNDRCV in the dcsndrcvtype operand of the TP1/Client/J environment definition.

[Figure]

(2) Receiving messages

When a CUP uses the cltAssemReceive method to make a message-receiving request, TP1/Client/J treats the first 4 bytes of the received message as the message length and assembles or disassembles the message and reports it to the CUP. The value set as the message length is processed as the network byte order. The remote system that sends the message must set the message length as a network byte order. To use the cltAssemReceive method, specify either DCCLT_ONEWAY_RCV or DCCLT_SNDRCV in the dcsndrcvtype operand of the TP1/Client/J environment definition.

[Figure]