Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QBluetoothRfcommSocket class represents an RFCOMM client socket. More...
#include <QBluetoothRfcommSocket>
Inherits QBluetoothAbstractSocket.
The QBluetoothRfcommSocket class represents an RFCOMM client socket.
The Bluetooth RFCOMM protocol provides emulation of serial ports over the lower-level protocols of Bluetooth, namely L2CAP. The implementation of RFCOMM protocol under Linux uses sockets, and is in general very similar to TCP socket programming. QBluetoothRfcommSockets are thus stream oriented network sockets and share many of the interface aspects of the Qt TCP sockets.
The channel and address of the connected peer are fetched by calling remoteChannel() and remoteAddress(). localAddress() return address of the local socket.
See also QBluetoothRfcommServer and QBluetoothAbstractSocket.
Constructs a new QBluetoothRfcommSocket object. The parent parameter is passed to the QObject constructor.
Destroys the socket.
Attempts to open a RFCOMM connection between the local device with address local and the remote device with address remote. The RFCOMM channel to use is given by channel. This function should generally return immediately, and the socket will enter into the ConnectingState.
Optionally the client can request that the connection be secured by specifying the options parameter. NOTE: This feature might not work under some systems. The options will be set but might be ignored by the implementation.
The function returns true if the connection process could be started, and false otherwise.
Note that the connection could still fail, the state of the socket will be sent in the stateChanged() signal.
See also state(), connected(), and waitForConnected().
Returns true if the socket is authenticated.
See also securityOptions() and isEncrypted().
Returns true if the socket is encrypted.
See also securityOptions() and isAuthenticated().
Returns the address of the local device. If the socket is not currently connected, returns QBluetoothAddress::invalid.
See also remoteAddress() and remoteChannel().
Returns the address of the remote device. If the socket is not currently connected, returns QBluetoothAddress::invalid.
See also localAddress() and remoteChannel().
Returns the RFCOMM channel of the remote device. If the socket is not currently connected, returns -1.
See also remoteAddress() and localAddress().
Returns the security options currently active for the socket.
See also isAuthenticated() and isEncrypted().
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |