Link Disconnect Option
The link disconnect option, *kCMOIrDALinkDisconnectTimeout
, sets the time (in seconds) before communication is terminated, if no activity is received from the peer device.The following example shows the use of this option:
Proper communication protocol between IrDA devices is to send data or a "ready-to-receive" packet every 500ms (minimum). If no such activity is detected for the number of seconds specified by this option, then the IrDA tool is disconnected. The default value is 40 seconds. Valid values are 3, 8, 12, 16, 20, 25, 30, and 40.local option := {
label: kCMOIrDALinkDisconnectTimeout
, // link disconnect threshold type: 'option, opCode: opSetRequired, data: { arglist: [ 8, // disconnect after 8 seconds ], typelist: [ 'struct, uLong, // time before disconnect, default is 40 seconds ], }, };
This option applies to both
Connect
andListen
operations.Note that after 3 seconds of non-activity, a disconnect warning event is sent from the IrDA tool via the endpoint
EventHandler
method. The values used for theeventCode
anddata
slots of the event frame passed toEventHandler
are shown in Table 9-6.Table 9-6 Disconnect warning event values
Constant Value Event codes kEventToolSpecific 1 kEventDisconnect 2 kEventRelease 3 IrDA tool event data kDisconnectWarningEvent 1
© Apple Computer, Inc.
26 APR 1997Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help