Class

IOBluetoothL2CAPChannel

An instance of IOBluetoothL2CAPChannel represents a single open L2CAP channel.

Declaration

@interface IOBluetoothL2CAPChannel : IOBluetoothObject

Overview

A client won't create IOBluetoothL2CAPChannel objects directly. Instead, the IOBluetoothDevice's L2CAP channel open API is responsible for opening a new L2CAP channel and returning an IOBluetoothL2CAPChannel instance representing that newly opened channel. Additionally, the IOBluetooth notification system will send notifications when new L2CAP channels are open (if requested).

After a new L2CAP channel is opened, the L2CAP configuration process will not be completed until an incoming data listener is registered with the IOBluetoothL2CAPChannel object. The reason for this is to due to the limited buffering done of incoming L2CAP data. This way, we avoid the situation where incoming data is received before the client is ready for it. Once a client is done with an IOBluetoothL2CAPChannel that it opened, it should call -closeChannel. Additionally, if the client does not intend to use the connection to the remote device any further, it should call -closeConnection on the IOBluetoothDevice object.

Topics

Instance Properties

PSM

Returns the PSM for the target L2CAP channel.

device

Returns the IOBluetoothDevice to which the target L2CAP channel is open.

incomingMTU

Returns the current incoming MTU for the L2CAP channel.

localChannelID

Returns the local L2CAP channel ID for the target L2CAP channel.

objectID

Returns the IOBluetoothObjectID of the given IOBluetoothL2CAPChannel.

outgoingMTU

Returns the current outgoing MTU for the L2CAP channel.

remoteChannelID

Returns the remote L2CAP channel ID for the target L2CAP channel.

Instance Methods

- closeChannel

Initiates the close process on an open L2CAP channel.

- delegate

Returns the currently assigned delegate

- isIncoming

Returns TRUE if the channel is an incoming channel.

- registerForChannelCloseNotification:selector:

Allows a client to register for a channel close notification.

- requestRemoteMTU:

Initiates the process to reconfigure the L2CAP channel with a new outgoing MTU.

- setDelegate:

Allows an object to register itself as client of the L2CAP channel.

- setDelegate:withConfiguration:

Allows an object to register itself as client of the L2CAP channel.

- writeAsync:length:refcon:

Writes the given data over the target L2CAP channel asynchronously to the remote device.

- writeSync:length:

Writes the given data synchronously over the target L2CAP channel to the remote device.

Type Methods

+ registerForChannelOpenNotifications:selector:

Allows a client to register for L2CAP channel open notifications for any L2CAP channel.

+ registerForChannelOpenNotifications:selector:withPSM:direction:

Allows a client to register for L2CAP channel open notifications for certain types of L2CAP channels.

+ withObjectID:

Returns the IObluetoothL2CAPChannel with the given IOBluetoothObjectID.

Relationships

Inherits From

Conforms To