Skip to content

Commit 79eb72b

Browse files
committed
doc: 更新文档
1 parent 6304147 commit 79eb72b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/BootstrapBlazor.Server/Components/Samples/Sockets/Adapters.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<Pre>// 数据适配器内部使用固定长度数据处理器
4848
private readonly DataPackageAdapter _dataAdapter = new(new FixLengthDataPackageHandler(12));
4949

50-
_dataAdapter.ReceivedCallBack = async Data =>
50+
_dataAdapter.ReceivedCallback = async Data =>
5151
{
5252
// 此处接收到的数据 Data 为完整响应数据
5353
};</Pre>

src/BootstrapBlazor.Server/Components/Samples/Sockets/AutoReceives.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
<li>点击 <b>连接</b> 按钮后通过 <code>ITcpSocketFactory</code> 服务实例(<a href="/socket-factory" target="_blank">传送门</a>)创建的 <code>ITcpSocketClient</code> 对象连接到网站模拟 <code>TcpServer</code></li>
1515
<li>点击 <b>断开</b> 按钮调用 <code>CloseAsync</code> 方法断开 Socket 连接</li>
1616
</ul>
17-
<p>使用 <code>ReceivedCallBack</code> 委托获得接收到的数据,可通过 <code>+=</code> 方法支持多个客户端接收数据</p>
18-
<Pre>_client.ReceivedCallBack += OnReceivedAsync;</Pre>
17+
<p>使用 <code>ReceivedCallback</code> 委托获得接收到的数据,可通过 <code>+=</code> 方法支持多个客户端接收数据</p>
18+
<Pre>_client.ReceivedCallback += OnReceivedAsync;</Pre>
1919
<p>特别注意如果当前页面对 <code>ISocketClient</code> 实例不销毁时需要继承 <code>IDisposable</code> 或者 <code>IAsyncDisposable</code> 接口,在 <code>Dispose</code> 或者 <code>DisposeAsync</code> 中移除委托,以防止内存泄露</p>
2020
<Pre>private void Dispose(bool disposing)
2121
{
2222
if (disposing)
2323
{
2424
if (_client is { IsConnected: true })
2525
{
26-
_client.ReceivedCallBack -= OnReceivedAsync;
26+
_client.ReceivedCallback -= OnReceivedAsync;
2727
}
2828
}
2929
}</Pre>

src/BootstrapBlazor.Server/Components/Samples/Sockets/Notice.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
<p><code>ITcpSocketFactory</code> 服务仅在 <code>Server</code> 模式下可用</p>
33
</Tips>
44

5-
<PackageTips Name="BootstrapBlazor.TcpSocket" />
5+
<PackageTips Name="Longbow.TcpSocket" />

0 commit comments

Comments
 (0)