Skip to content

Commit fc90832

Browse files
committed
doc: 更新 SocketClient 文档
1 parent 3ccdc1f commit fc90832

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ private ITcpSocketFactory? TcpSocketFactory { get; set; }</Pre>
2424
options.LocalEndPoint = new IPEndPoint(IPAddress.Loopback, 0);
2525
});</Pre>
2626

27+
<p>可以通过注入服务直接获得 <code>ITcpSocketClient</code> 实例</p>
28+
29+
<Pre>[Inject]
30+
[NotNull]
31+
private ITcpSocketClient? TcpSocketClient { get; set; }</Pre>
32+
2733
<p class="code-label">3. 使用方法</p>
2834

2935
<p>注意:以下方法均为线程不安全方法,多线程并发时需要自行处理</p>

0 commit comments

Comments
 (0)