So you are saying that there is currently no way with RTC to do this without relying on a separate event to be fired to read the response?
Correct. If you want to post a custom request to the Server which will give you back a custom Response, you can only do it by implementing the OnCheckRequest and OnDataReceived events, just like you've done in the code you have posted above.
If you want to wait for a response after you have Posted a Request, use the "WaitForCompletion", "DoWaitForCompletion" or "WaitForCompletionEx" methods, which are available on TRtcDataRequest and TRtcDataClient components.
For example, the following line will wait 60 seconds for a response to be received from the Server without allowing user interaction. If something goes wrong or the response does not arrive within 60 seconds, an exception will be raised (depending on what goes wrong) ...
RtcDataRequest1.WaitForCompletionEx(False, 60);
Best Regards,
Danijel Tkalcec