File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
src/BootstrapBlazor.Server
Components/Samples/Sockets Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 88namespace BootstrapBlazor . Server . Components . Samples . Sockets ;
99
1010/// <summary>
11- ///
11+ /// 接收电文示例
1212/// </summary>
1313public partial class Receives : ComponentBase , IDisposable
1414{
@@ -27,7 +27,10 @@ protected override void OnInitialized()
2727 base . OnInitialized ( ) ;
2828
2929 // 从服务中获取 Socket 实例
30- _client = TcpSocketFactory . GetOrCreate ( "bb" , key => new IPEndPoint ( IPAddress . Loopback , 0 ) ) ;
30+ _client = TcpSocketFactory . GetOrCreate ( "bb" , options =>
31+ {
32+ options . LocalEndPoint = new IPEndPoint ( IPAddress . Loopback , 0 ) ;
33+ } ) ;
3134 _client . ReceivedCallBack += OnReceivedAsync ;
3235 }
3336
Original file line number Diff line number Diff line change 72107210 "OfficeViewerNormalTitle": "Basic Usage",
72117211 "OfficeViewerNormalIntro": "Set the document URL for preview by configuring the <code>Url</code> value",
72127212 "OfficeViewerToastSuccessfulContent": "Office document loaded successfully"
7213+ },
7214+ "BootstrapBlazor.Server.Components.Samples.Sockets.Receives": {
7215+ "ReceivesTitle": "Socket Receive",
7216+ "ReceivesDescription": "Receive data through Socket and display it",
7217+ "NormalTitle": "Basic usage",
7218+ "NormalIntro": "After connecting, the timestamp data sent by the server is automatically received through the <code>ReceivedCallBack</code> callback method"
72137219 }
72147220}
Original file line number Diff line number Diff line change 72107210 "OfficeViewerNormalTitle": "基本用法",
72117211 "OfficeViewerNormalIntro": "通过设置 <code>Url</code> 值设置预览文档地址",
72127212 "OfficeViewerToastSuccessfulContent": "Office 文档加载成功"
7213+ },
7214+ "BootstrapBlazor.Server.Components.Samples.Sockets.Receives": {
7215+ "ReceivesTitle": "Socket 接收示例",
7216+ "ReceivesDescription": "通过 Socket 接收数据并且显示",
7217+ "NormalTitle": "基本用法",
7218+ "NormalIntro": "连接后通过 <code>ReceivedCallBack</code> 回调方法自动接收服务端发送来的时间戳数据"
72137219 }
72147220}
You can’t perform that action at this time.
0 commit comments