APP - 21
A
PPENDICES
(e) Response message receive processing
Figure below shows an example of the response message receive
processing on the external device side.
Communication processing
on the external device side
Request message send processing
Response message receive processing
Is TCP connection open?
Has the data
been received within the
monitoring timer?
Check the receive data size.
Processing for response messages
Has processing
for all received messages
completed?
Error processing
END
TCP connection is closed.
The monitoring timer has run over.
The response message
for the following request
has been received.
Receive the rest of
response messages.
The receive data exceeds
the size limit.
REMARK
Personal computers use the TCP socket functions internally for Ethernet
communication.
These functions do not have boundary concept. Therefore, when data is sent by
executing the "send" function once, the "recv" function needs to be executed once or
more to receive the same data.
(One execution of the "send" function does not correspond to one execution of the
"recv" function.)
For this reason, receive processing described above is required on the external
device side.
If the "recv" function is used in blocking mode, data may be read by executing the
function once.