using System.Linq.Expressions; using System.Net.WebSockets; namespace yawaflua.WebSockets.Models.Interfaces; public interface IWebSocketManager { /// /// Broadcast message to all users /// /// selector of users /// message, broadcasted to all users /// type of message /// cancellation token /// public Task Broadcast(Func selector,string message, WebSocketMessageType messageType = WebSocketMessageType.Text, CancellationToken cts = default); /// /// Provides list of clients connected to host /// /// public List GetAllClients(); /// /// Send to specific user data /// Analog of Broadcast(k => k.Id == ID, message) /// /// Id of user /// message to user /// type of message /// cancellation token /// public Task SendToUser(Guid id, string message, WebSocketMessageType messageType, CancellationToken cts); }