This is how I get it from a SuperChannel:
procedure TMyInterface.RORemoteDataModuleGetDispatchInfo(const aTransport: IROTransport; const aMessage: IROMessage);
var
tcpinfo: IROTCPTransport;
Session: TCustomSession;
szClientIP : String;
begin
Session := TCustomSession(Self.Session);
if Supports(aTransport, IROTCPTransport, tcpinfo) then
begin
szClientIP := tcpinfo.ClientAddress;
if (not Session.ShownTCP) or (Session.TCPAddress <> szClientIP) then
begin
Session.TCPAddress := szClientIP;
Session.Report(leInformation, 'TCP address ' + szClientIP);
Session.ShownTCP := True;
end;
end
else
begin
Session.Report(leInformation, 'TCP address not available');
end;
end;
The specifics of what you do with it are up to you, but you have to get it as it is set up, and store it in the session object if you want to pick it up later. I implemented a custom session to hold the client Ip so that I could get it any time in further calls.