Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public SocketClient(SocketConnectionSettings settings)
 {
     Settings = settings;
 }