SampleSmart 1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
TcpServerTestView.xaml.Event.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.Communication.Core.Protocols;
2using Dreamine.Communication.Sockets.Enums;
4
6
15public sealed class TcpServerTestViewEvent
16{
26
52 {
53 _runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
54
55 SelectedTcpServerProtocol = "RawAvailable";
56 SelectedTcpServerEncoding = PlainTextProtocolOptions.Utf8EncodingName;
57 SelectedTcpServerSendTargetMode = nameof(TcpServerSendTargetMode.Broadcast);
59 TcpServerSendText = "Hello from Dreamine TCP Server";
60 }
61
70 public IReadOnlyList<string> TcpServerProtocols => _runtime.TcpProtocols;
71
80 public IReadOnlyList<string> TcpServerEncodings => _runtime.TextEncodings;
81
90 public IReadOnlyList<string> TcpServerSendTargetModes => _runtime.TcpServerSendTargetModes;
91
100 public string SelectedTcpServerProtocol { get; set; }
101
110 public string SelectedTcpServerEncoding { get; set; }
111
120 public string SelectedTcpServerSendTargetMode { get; set; }
121
130 public bool IsTcpServerEchoEnabled { get; set; }
131
140 public string TcpServerSendText { get; set; }
141
158
167 public void StopServer()
168 {
169 _ = _runtime.StopTcpServerAsync();
170 }
171
188
197 public void SendServer()
198 {
199 _ = _runtime.SendTcpServerAsync(
204 }
205}