Changeset 416 for PinConnection/UCommTelnet.pas
- Timestamp:
- Aug 20, 2012, 2:45:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PinConnection/UCommTelnet.pas
r414 r416 57 57 ServerChecked: Boolean; 58 58 SupportedByServer: Boolean; 59 procedure Assign(Source: TTelnetOption); virtual; 59 60 function CheckOption: Boolean; 60 61 procedure SendCommand(Request, Response: TListByte); … … 78 79 procedure ReadResponse(Response: TListByte); 79 80 function ResponseCount: Integer; 81 protected 82 procedure AssignTo(Dest: TPersistent); override; 80 83 public 81 84 Options: TListObject; … … 92 95 procedure SendSubCommand(OptionCode: TTelnetCommand; Request, Response: TListByte); 93 96 procedure SendCommand(Code: TTelnetCode; Request, Response: TListByte); 97 procedure Purge; 94 98 constructor Create(AOwner: TComponent); override; 95 99 destructor Destroy; override; … … 114 118 if FActive = AValue then Exit; 115 119 FActive := AValue; 120 end; 121 122 procedure TTelnetOption.Assign(Source: TTelnetOption); 123 begin 124 SupportedByServer := Source.SupportedByServer; 125 ServerChecked := Source.ServerChecked; 126 Code := Source.Code; 127 FOnRequest := Source.FOnRequest; 128 Active := Source.FActive; 116 129 end; 117 130 … … 306 319 end; 307 320 321 procedure TCommTelnet.AssignTo(Dest: TPersistent); 322 var 323 I: Integer; 324 begin 325 if Dest is TCommTelnet then begin 326 TCommTelnet(Dest).Timeout := Timeout; 327 TCommTelnet(Dest).PortType := PortType; 328 TCommTelnet(Dest).ErrorCount := ErrorCount; 329 TCommTelnet(Dest).OptionsNegotationEnable := OptionsNegotationEnable; 330 for I := 0 to Options.Count - 1 do begin 331 TTelnetOption(TCommTelnet(Dest).Options[I]).Assign(TTelnetOption(Options[I])); 332 TTelnetOption(TCommTelnet(Dest).Options[I]).Telnet := TCommTelnet(Dest); 333 end; 334 end else inherited; 335 end; 336 308 337 procedure TCommTelnet.Register(Option: TTelnetOption); 309 338 begin … … 399 428 end; 400 429 430 procedure TCommTelnet.Purge; 431 begin 432 FState := tsNormal; 433 FResponses.Clear; 434 end; 435 401 436 constructor TCommTelnet.Create(AOwner: TComponent); 402 437 begin
Note:
See TracChangeset
for help on using the changeset viewer.