mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 07:36:10 -04:00
Replace Bluetooth Device creation in the constructor.
PiperOrigin-RevId: 424887789
This commit is contained in:
@@ -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_ =
|
||||
|
||||
Reference in New Issue
Block a user