public GdbStub(int port, ICpuSupportingGdb cpu, bool autostartEmulation) { this.cpu = cpu; Port = port; pcktBuilder = new PacketBuilder(); commands = new CommandsManager(cpu); commands.ShouldAutoStart = autostartEmulation; TypeManager.Instance.AutoLoadedType += commands.Register; terminal = new SocketServerProvider(); terminal.DataReceived += OnByteWritten; terminal.ConnectionAccepted += delegate { cpu.Halted += OnHalted; cpu.ExecutionMode = ExecutionMode.SingleStep; }; terminal.ConnectionClosed += delegate { cpu.Halted -= OnHalted; cpu.ExecutionMode = ExecutionMode.Continuous; }; terminal.Start(port); commHandler = new CommunicationHandler(this); }
public SocketIOSource(int port) { server = new SocketServerProvider(); server.Start(port); }