Hello, StewVanB
I am sorry to hear about your problem.
Please note that the common practice in this case is to put your send and response-handling logic in separate functions. This way, you can add a function like this:
void ReceiveMessage()
{
// assuming that variables are initialized correctly
client->HasPendingData(dataSize);
if (dataSize != 0){
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("Got something."));
client->Recv(inData, dataSize, byteCount);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, FString::FromInt(byteCount));
}
Now you can call it in timer:
FTimerHandle MyTimerHandle;
GetWorldTimerManager().SetTimerMyTimerHandle, this, &AMyActor::ReceiveMessage, 0.01, true);
Thus, you should get appropriate messages.
Hope this helped!
Have a great day!