Ejemplo n.º 1
0
 public async void SendCommand(SyncCommand command)
 {
     if (this.Status == ConnectionStatus.Connected && this.User != null)
     {
         try
         {
             await Task.Run(() => _client.Send(command.ToString()));
         }
         catch (Exception) { }
     }
 }
Ejemplo n.º 2
0
        private void OnConnected(UserContext context)
        {
            // Connected - send registration command
            var command = new SyncCommand(SyncCommand.CommandTypes.Register);

            command.Data = new
            {
                Id        = _custid,
                Name      = _name,
                ShortName = _shortname,
                Password  = _password,
                Ssid      = _subSessionId
            };

            _client.Send(command.ToString());
        }