Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



How to set IrLAP options

The following example code illustrates the setting of IrLAP link options from the client side. The parameters have been chosen to switch the link around relatively quickly so as to facilitate better emulation of a full duplex connection.

//
// SET OPTIONS FOR LINK SESSION
//
// SetOpt/GetOpt on the link baud rate - 115.2
//
TPckgBuf<TBps> baudbuf(EBps115200);
sock1.SetOpt(KUserBaudOpt,KLevelIrMUX,baudbuf);
sock1.GetOpt(KUserBaudOpt,KLevelIrMUX,baudbuf);

//
// SetOpt/GetOpt on the host max TA time - 100ms.
//
TPckgBuf<TUint> intbuf(100);
sock1.SetOpt(KHostMaxTATimeOpt,KLevelIrMUX,intbuf);
sock1.GetOpt(KHostMaxTATimeOpt,KLevelIrMUX,intbuf);

//
// SetOpt/GetOpt on host max data size - 1024 bytes.
//
intbuf()=1024;
sock1.SetOpt(KHostMaxDataSizeOpt,KLevelIrMUX,intbuf);
sock1.GetOpt(KHostMaxDataSizeOpt,KLevelIrMUX,intbuf);