protected virtual void OnConnected() { EventHandler handler = Connected; if (handler != null) handler(this, EventArgs.Empty); }