public SimulatorManager(IButtplugLogManager aLogManager) : base(aLogManager) { BpLogger.Info("Loading Simulator Manager"); _scanning = false; _parser = new PipeMessageParser(); _logManager = new ButtplugLogManager(); _pipeServer = new NamedPipeServerStream("ButtplugDeviceSimulator", PipeDirection.InOut, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous); _tokenSource = new CancellationTokenSource(); _readThread = new Task(() => { connAccepter(_tokenSource.Token); }, _tokenSource.Token, TaskCreationOptions.LongRunning); _writeThread = new Task(() => { pipeWriter(_tokenSource.Token); }, _tokenSource.Token, TaskCreationOptions.LongRunning); _pingThread = new Task(() => { pingWriter(_tokenSource.Token); }, _tokenSource.Token, TaskCreationOptions.LongRunning); _readThread.Start(); _writeThread.Start(); _pingThread.Start(); }
public MainWindow() { InitializeComponent(); _parser = new PipeMessageParser(); }