在每个的TRORemoteDataModule 对象下,都实现有一个IROTransport类型的Transport,可以通过下面的方式获取:
var
obj : TObject;
sAddr : string;
begin
if Assigned(Transport) then
begin
obj := Transport.GetTransportObject;
if Assigned(obj) and (obj is TIndyHTTPTransport) then
begin
sAddr := TIndyHTTPTransport(obj).RequestInfo.RemoteIP;
end;
end;
在这里,这些客户端传送上来的信息都任意取:
property AuthExists: Boolean read FAuthExists;
property AuthPassword: string read FAuthPassword;
property AuthUsername: string read FAuthUsername;
property Command: string read FCommand;
property Cookies: TIdServerCookies read FCookies;
property Document: string read FDocument write FDocument; // writable for isapi compatibility. Use with care
property Params: TStrings read FParams;
property PostStream: TStream read FPostStream write FPostStream;
property RawHTTPCommand: string read FRawHTTPCommand;
property RemoteIP: String read FRemoteIP;
property UnparsedParams: string read FUnparsedParams write FUnparsedParams; // writable for isapi compatibility. Use with care
property FormParams: string read FFormParams write FFormParams; // writable for isapi compatibility. Use with care
property QueryParams: string read FQueryParams write FQueryParams; // writable for isapi compatibility. Use with care
property Version: string read FVersion;