background image
C H A P T E R 2 3
Endpoint Interface
Summary of the Endpoint Interface
23-27
Callback Spec Frame
23
myCallbackSpec := {
async:
Boolean
, // asynch request?
reqTimeout:
integer
, // time-out period, or 0
CompletionScript: // called when request is done
func(
endpoint
,
options
,
result
)...,
}
Output Spec Frame
23
myOutputSpec := {
async:
Boolean
, // asynch request?
reqTimeout:
integer
, // time-out period, in milliseconds
sendFlags:
integer
, // flag constant(s)
form:
symbol
, // data form identifier
target: { // used for 'binary data forms
offset:
integer
, // offset to begin sending from
length:
integer
// number of bytes to send
},
CompletionScript: // called when request is done
func(
endpoint
,
options
,
result
)...,
}
Input Spec Frame
23
myInputSpec := {
form:
symbol
, // data form identifier
target: { // used with 'template and 'binary data forms
typelist: [], // array of data types
arglist: [], // array of data items
data:
object
, // binary object to receive data
offset:
integer
// offset at which to write data
},
termination: { // defines termination conditions
byteCount:
integer
, // number of bytes to receive
endSequence:
object
, // char,string,number,or byte array
useEOP:
Boolean
// terminate on EOP indicator?
},
discardAfter:
integer
, // buffer size
rcvFlags:
integer
, // receive flag constant(s)
reqTimeout:
integer
, // time-out period, in milliseconds
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна