Jump to content

Epo

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Epo

    Pipeline questioning

    Yes, of course... (it works) Great thanks for the help and ....the library.
  2. Hi, I want use a pipeline. The only peculiarity is that in the first stage, there is only on item in the input but many in the output collection. But in the stage one, when it insert the first output, the exception 'Adding to completed collection'" occurs. Although the Input.CompleteAdding statement was not sent. Something is wrong certainly but where ? Thanks for help, Eddy Simplified case below (using Delphi 10.4/ Omnithread 3.07.08) procedure TForm1.Button1Click(Sender: TObject); begin PipelineExecute('1,2,3,4,6,10'); end; procedure TForm1.PipelineExecute(const sMes: string); var ppl: IOmniPipeline; Value: TOmniValue; begin ppl := Parallel.Pipeline .Stage(StageOne) .Stage(StageTwo) .run; ppl.Input.Add(sxmlMes); // ppl.Input.CompleteAdding; end; procedure TForm1.StageOne(const input, output: IOmniBlockingCollection); var s: string; OmVal: TOmniValue; arS: TArray<string>; i: Integer; begin input.Take(OmVal); // 0 arS := SplitString(OmVal.AsString,','); for i := 0 to Length(arS) -1 do Output.Add( StrToInt(ars[i])* 2); end; procedure TForm1.StageTwo(const input, output: IOmniBlockingCollection); var i: Integer; OmVal: TOmniValue; begin for OmVal in input do begin //....... output.Add(omval) ; end; end;
  3. Thank you, François. I will test it (probably - others tasks on fire) next week. Eddy
  4. Hi Joseph, Actually, the problem is not SSH itself. OpenSSH works perfectly with scripts (that open a connection, launch a script and close the connection). The goal is to keep an open connection and sends the instructions (and retrieve the outputs - stdout) like manually we can do it at a terminal but from a Delphi program. The open/close actions takes too much time in my case.
  5. Hi, I would like to know if it is possible with the ICS components to open a (remote) terminal SSH session with a linux machine in a Delphi program (on Win 10 e.g.) and to send commands bash (ls, ps, xtodo, ...) and to receive the outputs (to know when the command execute is finished). If so, is there an example or skeleton for this application type ? Thanks a lot, Eddy
×