From cf71f94992ec71f1eca032ee1a042296095f3e8f Mon Sep 17 00:00:00 2001 From: zhuovi Date: Thu, 7 Sep 2023 12:56:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Net/SocketClient.cs | 4 ++++ Net/SocketServer.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Net/SocketClient.cs b/Net/SocketClient.cs index b4ab0d0..62115d0 100644 --- a/Net/SocketClient.cs +++ b/Net/SocketClient.cs @@ -1173,6 +1173,10 @@ private async Task NetStreamSendAsync(byte[] buffers, OpCode opCode = OpCod public void MessageByteEventHandler(byte[] message) => OnMessageByte?.Invoke(this, message, EventArgs.Empty); /// public void AuthenticationEventHandler(string message) => OnAuthentication?.Invoke(this, message, EventArgs.Empty); + /// + public override void StartEventHandler() => OnStart?.Invoke(this, EventArgs.Empty); + /// + public override void StopEventHandler() => OnStop?.Invoke(this, EventArgs.Empty); #endregion #region 设置Socket diff --git a/Net/SocketServer.cs b/Net/SocketServer.cs index 3fbb126..c571202 100644 --- a/Net/SocketServer.cs +++ b/Net/SocketServer.cs @@ -570,9 +570,9 @@ private void CreateNewSocketIfNeeded() #region 调用当前事件 /// - public void StartEventHandler() => OnStart?.Invoke(this, EventArgs.Empty); + public override void StartEventHandler() => OnStart?.Invoke(this, EventArgs.Empty); /// - public void StopEventHandler() => OnStop?.Invoke(this, EventArgs.Empty); + public override void StopEventHandler() => OnStop?.Invoke(this, EventArgs.Empty); /// public void NewConnectionEventHandler(ISocketClient client) => OnNewConnection?.Invoke(client, EventArgs.Empty); ///