I was having the same problem.
The problem is that the buffer is null. with the changes the bytecount and the dataSize should be the same size.
void HandleRecieve()
{
uint32 dataSize = 0;
client->HasPendingData(dataSize);
if (dataSize != 0)
{
uint8 *inData = new uint8[dataSize];
int32 byteCount = 0;
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("Recieved data from server."));
socket->Recv(inData, dataSize, byteCount);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, FString::FromInt(byteCount));
}
}