NMFngr.pas
资源名称:FastNet.rar [点击查看]
上传用户:szzdds
上传日期:2013-09-18
资源大小:293k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit NMFngr;
- {$X+}
- {$R-}
- {$IFDEF VER100}
- {$DEFINE NMF3}
- {$ENDIF}
- {$IFDEF VER110}
- {$DEFINE NMF3}
- {$ENDIF}
- {$IFDEF VER120}
- {$DEFINE NMF3}
- {$ENDIF}
- {$IFDEF VER125}
- {$DEFINE NMF3}
- {$ENDIF}
- interface
- uses
- Classes, Forms, Psock ,NMConst;
- {$IFDEF VER110}
- {$ObjExportAll On}
- {$ENDIF}
- {$IFDEF VER120}
- {$ObjExportAll On}
- {$ENDIF}
- {$IFDEF VER125}
- {$ObjExportAll On}
- {$ENDIF}
- // CompName='TNMFinger';
- // Major_Version='4';
- // Minor_Version='02';
- // Date_Version='012798';
- type
- TNMFinger = class(TPowerSock)
- private
- FUser: string;
- function GetFingerString: string;
- protected
- { Protected declarations }
- public
- constructor Create(AOwner: TComponent); override;
- published
- property FingerStr: string read GetFingerString;
- property User: string read Fuser write Fuser;
- end; {_ TNMFinger = class(TPowerSock) _}
- implementation
- constructor TNMFinger.Create(AOwner: TComponent);
- begin
- inherited create(AOwner);
- Port := 79;
- end; {_ constructor TNMFinger.Create(AOwner: TComponent); _}
- function TNMFinger.GetFingerString: string;
- begin
- Result := '';
- if (not (csDesigning in ComponentState)) and (not (CSLoading in ComponentState)) then
- begin
- Connect;
- try
- writeln(FUser);
- while Connected or (DataAvailable) do
- if DataAvailable then Result := Result + ReadLn
- else {_ NOT if DataAvailable then Result := Result + ReadLn _}
- Application.ProcessMessages;
- finally
- Disconnect;
- end; {_ try _}
- end {_ if (not (csDesigning in ComponentState)) and (not (CSLoading in ComponentState)) then _}
- end; {_ function TNMFinger.GetFingerString: string; _}
- end.