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

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

2.4.5 Notes about using the TCP/IP communication facility

This subsection provides notes about using the TCP/IP communication facility.

Organization of this subsection
(1) Notes on sending messages
(2) Notes on receiving of messages

(1) Notes on sending messages

(a) Losing a message when an error occurs

If either of the errors described below occurs, TP1/Client/J and the MHP cannot detect that a message has been lost. Therefore, the user must assign a sequential number in the message or use some other means to be prepared for these types of errors:

(b) Establishing a connection

TP1/Client/J can become a client and send messages to an MHP. This means that TP1/Client/J establishes a connection to the MHP. If the MHP is using TP1/NET/TCP/IP, the connection is a server-type connection.

(2) Notes on receiving of messages

(a) Losing a message when an error occurs

If either of the errors described below occurs, TP1/Client/J and the MHP cannot detect that a message has been lost. Therefore, the user must assign a sequential number in the message or use some other means to be prepared for these types of errors:

(b) Checking received messages

Messages can be received from any MHP. Therefore, if a connection establishment request is received, accept the request unconditionally and receive the message. The user must determine if the message is directed to the CUP by checking if the message identifier included in the header is the one included in the message body.

(c) Message length

Messages are received using the TCP/IP protocol. The TCP/IP protocol separates each message into multiple packets and packs multiple messages into a single packet. This means that the end of the received message must be determined based on the message length the user specifies. The user initially receives a fixed-length header that includes the message length, and then specifies the message length included in the header to receive the actual message.

When a message whose length is less than the specified message length is received, TP1/Client/J assumes that the message has been segmented. Therefore, it does not return control to the CUP until it receives the portion of the message that remains as specified by the message length.

(d) Establishing a connection

TP1/Client/J can become a server and receive messages from an MHP. This means that the MHP establishes a connection to TP1/Client/J. If the MHP is using TP1/NET/TCP/IP, the connection is a client-type connection.