SampleSmart 1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
TcpClientTestView.xaml.Event.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.Communication.Core.Protocols;
3
5
14public sealed class TcpClientTestViewEvent
15{
25
51 {
52 _runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
53
54 SelectedTcpClientProtocol = "RawAvailable";
55 SelectedTcpClientEncoding = PlainTextProtocolOptions.Utf8EncodingName;
56 TcpClientSendText = "test";
57 }
58
67 public IReadOnlyList<string> TcpClientProtocols => _runtime.TcpProtocols;
68
77 public IReadOnlyList<string> TcpClientEncodings => _runtime.TextEncodings;
78
87 public string SelectedTcpClientProtocol { get; set; }
88
97 public string SelectedTcpClientEncoding { get; set; }
98
107 public string TcpClientSendText { get; set; }
108
117 public void ConnectClient()
118 {
119 _ = _runtime.ConnectTcpClientAsync(
122 }
123
132 public void DisconnectClient()
133 {
134 _ = _runtime.DisconnectTcpClientAsync();
135 }
136
145 public void SendClient()
146 {
147 _ = _runtime.SendTcpClientAsync(
151 }
152}