/// <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)); } }
private void OnHandshakeCompleted(HandshakeCompleted data) { Coordinator?.Connect(data.Connection, data.Handshake); }
protected virtual void OnHandshakeCompleted(HandshakeEventArgs e) { HandshakeCompleted?.Invoke(this, e); }
internal void HandleRemoteHandshakeCompletion(Identity remoteIdentity) { var e = new TcpTransportHandshakeCompletionEventArgs(remoteIdentity); HandshakeCompleted?.Invoke(e); }
protected void OnHandshakeCompleted(BaudRateEventArgs e) { HandshakeCompleted?.Invoke(this, e); }