private async Task <InterruptResponse> InterruptAsync(InterruptRequest request) { _service.Interrupt( request.ClientGuid, request.Domain); return(new InterruptResponse()); }
public ShellServer( ILogger <ShellServer> logger, IOptions <KernelContext> context, IServiceProvider provider, IShellRouter router ) { this.logger = logger; this.context = context.Value; this.provider = provider; this.router = router; router.RegisterHandler("kernel_info_request", async message => OnKernelInfoRequest(message)); router.RegisterHandler("interrupt_request", async message => InterruptRequest?.Invoke(message)); router.RegisterHandler("shutdown_request", async message => OnShutdownRequest(message)); }
public InterruptReply Interrupt(InterruptRequest request) { Session session; if (SessionProcess.Sessions.TryGetValue(request.SessionId, out session)) { session.userInterrupted = true; return(new InterruptReply { Message = "", Status = "O" }); } else { return(new InterruptReply { Message = "Session id not found", Status = "1" }); } }