Replace Bluetooth Device creation in the constructor.

PiperOrigin-RevId: 424887789
This commit is contained in:
jfcarroll
2022-02-02 11:45:15 -08:00
committed by hai007
parent 1e61c5fb23
commit 1bc6798e14
@@ -23,6 +23,11 @@ namespace windows {
BluetoothSocket::BluetoothSocket(StreamSocket streamSocket)
: windows_socket_(streamSocket) {
bluetooth_device_ = std::make_unique<BluetoothDevice>(
winrt::Windows::Devices::Bluetooth::BluetoothDevice::FromHostNameAsync(
windows_socket_.Information().RemoteHostName())
.get());
input_stream_ =
std::make_unique<BluetoothInputStream>(windows_socket_.InputStream());
output_stream_ =