Example #1
0
        /// <summary>
        /// Send a command packet to the VM
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task SendCommandAsync(JdwpCommand command)
        {
            var waitingOperation = new WaitingOperationDescriptor(command);

            lock (_waitingOperations)
            {
                _waitingOperations.Add(command.PacketId, waitingOperation);
            }

            SendToTransport(command);

            return(waitingOperation.Task);
        }
Example #2
0
 private void SendToTransport(JdwpCommand command)
 {
     _transport.Send(command.GetPacketBytes());
 }
Example #3
0
 public WaitingOperationDescriptor(JdwpCommand command)
 {
     _command = command;
 }