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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...