コード例 #1
0
 private ListenerEmulator(CancellationToken token, ListenerEmulatorConfig config)
 {
     _token    = token;
     _config   = config;
     _listener = TcpListener.Create(_config.Port);
     _listener.Start();
     _ = GetConnection();
 }
コード例 #2
0
 public static ListenerEmulator Create(CancellationToken token, ListenerEmulatorConfig args)
 {
     return(new ListenerEmulator(token, args));
 }