Jump to content

Threading in uniGUI


mhmda

Recommended Posts

Hello,

 

I'm working on a project using unigui framework, and one part of the project is a "TELNET" connection to network equipment: reading a configuration from: Routers, Switchs, VoIP... for "TELNET" I use /n software  ip*works components.

 

But I didn't manage to run even a single connection from unigui, I tried using "TThread" but with no success.

 

I don't know how to solve it !

 

When debugging the: "uIdThread" throws the exception, here is the relevant part from "uIdThread":

Include(FOptions, itoReqCleanup);
        try
          try
            BeforeRun;
            try
              if Loop then begin
                while not Stopped do begin
                  try
                    Run;
                  except
                    on E: Exception do begin
                      if not HandleRunException(E) then begin
                        Terminate;>>>>>>>> HERE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                        raise;
                      end;
                    end;
                  end;
                end;
              end else begin

here is a part of the code:

TelnetClient=class(TipwTelnet)
   private
    level:integer;
    hostname:string;
    writing_data:boolean;
    memo1:TUniMemo;
   public
    procedure  StartConnection(ip:string);
    procedure  mDataAvailable(Sender: TObject; Text: string);
    procedure  SendString(cmd:string;Key_Enter:integer);
    procedure  Reconnect(Sender: TObject;const ConnectionEvent: string; StatusCode: Integer;const Description: string);
    procedure  mDisconnected(Sender: TObject; StatusCode: Integer;const Description: string);
    destructor destroy();override;
  end;
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...