13.3.2 socket函数介绍
(1) 构造函数
QBluetoothSocket(QBluetoothServiceInfo::Protocol socketType, QObject *parent = Q_NULLPTR)
QBluetoothSocket(QObject *parent = Q_NULLPTR)
(2) 中止当前连接并重置套接字
void QBluetoothSocket::abort() //关闭连接
void QBluetoothSocket::close() //关闭连接
与disconnectFromService()不同,此函数立即关闭套接字,放弃写入缓冲区中未发出的任何数据。
注意:在Android上,中止套接字需要与Android线程进行异步交互。 因此,关联的disconnect()和stateChanged()信号将被延迟,直到线程完成关闭。
(3)