C H A P T E R 2 3
Using the Endpoint Interface
Specifying Flags for Receiving
For certain communication tools, it may be necessary to use special protocol flags
when receiving data. You do this by specifying one or more flag constants in the
slot in the input spec. You can use such flags only if the communication
tool supports them.
For example, some of the built-in communication tools, such as the infrared and
AppleTalk tools, support only framed receiving (packetized data). In order to use
framed receiving, you must set the
slot to the constant
the infrared tool, if you do not specify a
, the tool
will behave unexpectedly.
Do not define the
slot if the underlying communication tool does not
support EOP indicators. If you do so, your input will terminate after each physical
buffer of data is received. If you wish to terminate an input spec based on an EOP
indicator, set the
slot in the
Of the built-in communication tools, only the infrared, AppleTalk, and framed
asynchronous serial tools support framed packets and the
If you set the
flag and set the
, you cannot also use
slot in the termination frame--if you do,
ignored. In this case, only an EOP indicator will terminate input. If you do want to
slot with the
flag, set the
the latter case, the remote system should send an EOP indicator with every packet,
though input won't terminate until the
condition is met.
Specifying an Input Time-Out
You can specify a time-out for input in the
slot of the input spec. In
this slot, you specify the time, in milliseconds, of inactivity to allow during input.
If there is no input for the specified interval, the time-out expires, the input is
terminated, and the
message is sent to the input spec frame.
In this case, the result code passed with the
Don't specify a
value less than 30 milliseconds.
Note that if a time-out expires for an asynchronous request such as receiving, that
request and all outstanding requests are canceled.
Specifying Data Filter Options
As incoming data is received in the input buffer, the data can be processed, or
filtered. This filtering can occur on all types of received data, except binary data
(defined by the
data form). This filtering of data is defined by the