From 0958cef33a4a0baa061c0388e461ccafee258708 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 28 Sep 2021 19:09:27 +0900 Subject: [PATCH] [Modify] Remove it --- .../Server/WebSocketServiceManager.cs | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/websocket-sharp/Server/WebSocketServiceManager.cs b/websocket-sharp/Server/WebSocketServiceManager.cs index 47a3dd37..3ee37b5c 100644 --- a/websocket-sharp/Server/WebSocketServiceManager.cs +++ b/websocket-sharp/Server/WebSocketServiceManager.cs @@ -554,57 +554,6 @@ namespace WebSocketSharp.Server } } - /// - /// Sends asynchronously to every client in - /// the WebSocket services. - /// - /// - /// This method does not wait for the send to be complete. - /// - /// - /// A that represents the text data to send. - /// - /// - /// - /// An delegate or - /// if not needed. - /// - /// - /// The delegate invokes the method called when the send is complete. - /// - /// - /// - /// The current state of the manager is not Start. - /// - /// - /// is . - /// - /// - /// could not be UTF-8-encoded. - /// - [Obsolete ("This method will be removed.")] - public void BroadcastAsync (string data, Action completed) - { - if (_state != ServerState.Start) { - var msg = "The current state of the manager is not Start."; - throw new InvalidOperationException (msg); - } - - if (data == null) - throw new ArgumentNullException ("data"); - - byte[] bytes; - if (!data.TryGetUTF8EncodedBytes (out bytes)) { - var msg = "It could not be UTF-8-encoded."; - throw new ArgumentException (msg, "data"); - } - - if (bytes.LongLength <= WebSocket.FragmentLength) - broadcastAsync (Opcode.Text, bytes, completed); - else - broadcastAsync (Opcode.Text, new MemoryStream (bytes), completed); - } - /// /// Sends the data from asynchronously to /// every client in the WebSocket services.