If you use XmlRpcServer with Indy10: (See: demos > delphi > server > threaded > Main.pas)
121procedureTForm1.HelloMethod(Thread:TRpcThread;constMethodName:string;122List:TList;Return:TRpcReturn);123var124Msg:string;125begin126{TheparameterlistissenttoyourmethodasaTListofparameters127thismustbecastedtoaparametertobeaccessed.Ifaerroroccurs128duringtheexecutionofyourmethodtheserverwillfallbacktoaglobal129handlerandtrytorecoverinwhichcasethestackerrorwillbesentto130theclient}131132{grabthesentstring}133Msg:=TRpcParameter(List[0]).AsString;134135{returnamessageshowingwhatwassent}136Return.AddItem('You just sent '+Msg);137138//synchronizethemethodhandlerwiththeVCLmainthread139FCriticalSection.Enter;140try141FMessage:=IntToStr(GetCurrentThreadId)+' '+Msg;142{$ifdefINDY9}143Thread.Synchronize(AddMessage);144{$endif}145{$ifdefINDY10}//DremLINBEGPID:=GetCurrentThreadId;//ProcessIDIP:=Thread.Connection.Socket.Binding.IP;//ServerIPPeerIP:=Thread.Connection.Socket.Binding.PeerIP;//ClientIP//DremLINEND146Tidsync.SynchronizeMethod(AddMessage);147{$endif}148finally149FCriticalSection.Leave;150end;151end;
If you use XmlRpcServer with Indy9 - I don't now :((
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how to know client ip address?
since xmlrpc has no security, i think ip filter will be a simple solution…
Hi,
If you use XmlRpcServer with Indy10: (See: demos > delphi > server > threaded > Main.pas)
If you use XmlRpcServer with Indy9 - I don't now :((
Regards.