public ReliableFrameSender(ISerialAdaptor serial) { _serial = serial ?? throw new ArgumentNullException(nameof(serial)); _shouldExit = false; _threadTrigger = new EventWaitHandle(false, EventResetMode.AutoReset); _senderTasks = new ConcurrentQueue <SenderTask>(); _random = new Random(); _thread = new Thread(new ThreadStart(ThreadLoop)); _thread.Priority = ThreadPriority.Highest; _thread.Start(); }
public KeyboardMouse(ISerialAdaptor serial) { _sender = new ReliableFrameSender(serial); _keyboardKeyStates = new bool[255]; }