public virtual async Task Connect(SocketConnectionSettings settings) { lock (this) { Socket = new StreamSocket(); } try { await Socket.ConnectAsync(settings.HostName, settings.ServiceName); } catch (Exception ex) { throw new Exception("Can't connect to imBMW Bluetooth device. Check that it's paired and online.", ex); } OnConnected(); }
public SocketClient(SocketConnectionSettings settings) { Settings = settings; }