// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Threading; using System.Threading.Tasks; using osu.Framework.Bindables; namespace osu.Game.Online.Notifications.WebSocket { /// /// A client for asynchronous notifications sent by osu-web. /// public interface INotificationsClient { /// /// Whether this is currently connected to a server. /// IBindable IsConnected { get; } /// /// Invoked when a new arrives for this client. /// event Action? MessageReceived; /// /// Sends a to the notification server. /// Task SendAsync(SocketMessage message, CancellationToken? cancellationToken = default); } }