Exemplo n.º 1
0
        /// <summary>
        /// Internal, do not use :)
        /// </summary>
        internal void Start()
        {
            // ThreadPool.QueueUserWorkItem(_ =>
            // {
            if (!DoHandshake())
            {
                Error?.Invoke(this, new Exception("Handshake Failed."));
                Disconnected?.Invoke(this, this);
                return;
            }

            HandshakeCompleted?.Invoke(this, this);
            StartMessageLoop();
            // });
        }
    /// <summary>
    /// This class handles the last.fm protocol implementations.
    /// </summary>
    static AudioscrobblerBase()
    {
      LoadSettings();
      workerSuccess += new HandshakeCompleted(OnHandshakeSuccessful);
      workerFailed += new HandshakeFailed(OnHandshakeFailed);

      if (_useDebugLog)
      {
        Log.Info("AudioscrobblerBase: new scrobbler for {0} with {1} cached songs - debuglog = {2}", Username,
                 Convert.ToString(queue.Count), Convert.ToString(_useDebugLog));
      }
    }
Exemplo n.º 3
0
 private void OnHandshakeCompleted(HandshakeCompleted data)
 {
     Coordinator?.Connect(data.Connection, data.Handshake);
 }
Exemplo n.º 4
0
 protected virtual void OnHandshakeCompleted(HandshakeEventArgs e)
 {
     HandshakeCompleted?.Invoke(this, e);
 }
Exemplo n.º 5
0
        internal void HandleRemoteHandshakeCompletion(Identity remoteIdentity)
        {
            var e = new TcpTransportHandshakeCompletionEventArgs(remoteIdentity);

            HandshakeCompleted?.Invoke(e);
        }
Exemplo n.º 6
0
 protected void OnHandshakeCompleted(BaudRateEventArgs e)
 {
     HandshakeCompleted?.Invoke(this, e);
 }