Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to use IrDA options

The following sample code section illustrates the use of KUnexpeditedDataOpt and KExpeditedDataOpt for setting sequenced and urgent data transfer respectively.

In general, these should not be used — an RSocket::Send() with the relevant flag set is recommended for urgent data. In most practical circumstances, the overhead provided by doing unexpedited sends is minimal compared to the danger of losing expedited data.

TInt ret;
...
//
// Setting option for Unexpedited (Non-Urgent) Data transfer
//

sock1.SetOpt(KUnexpeditedDataOpt,&buf,KLevelIrMUXSAP);

//
// Getting option for Expedited (Urgent) data transfer
//
sock1.GetOpt(KExpeditedDataOpt,&buf,KLevelIrMUXSAP);
ret=*buf.Ptr();
if (ret==KExpeditedDataOpt)
    {
   // Station set for Expedited Data Transfer
    }
else
    {
   // Station set for Unexpedited Data Transfer }


See also

Reading and writing data

How to write data