Can't receive response from socket

Hi, I’m trying to receive a response from a server.
This is my code:

Socket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT("default"), false);
	GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, "socket creato");
	FString address = TEXT("127.0.0.1");
	int32 port = 30000;
	FIPv4Address ip;
	FIPv4Address::Parse(address, ip);


	TSharedRef<FInternetAddr> addr = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateInternetAddr();
	addr->SetIp(ip.Value);
	addr->SetPort(port);

	bool connected = Socket->Connect(*addr);
	FString serialized = TEXT("START|1");
	TCHAR *serializedChar = serialized.GetCharArray().GetData();
	int32 size = FCString::Strlen(serializedChar);
	int32 sent = 0;
	uint32 dataSize = 0;
	int32 byteCount = 0;
	bool successful = Socket->Send((uint8*)TCHAR_TO_UTF8(serializedChar), size, sent);
	uint8 *inData = 0;

	if (Socket->HasPendingData(dataSize))
	{
		Socket->Recv(inData, dataSize, byteCount);
		FString s = BytesToString(inData, 1);
		GEngine->AddOnScreenDebugMessage(-1, 50.f, FColor::Black, s);
	}

The problem is at

Socket->Recv(inData, dataSize, byteCount);
		FString s = BytesToString(inData, byteCount);

the Fstring s is always empty, but dataSize reports the right dimension of the response.
Can someone help me?
Thanks!

Give it a decent sized buffer? For example:

uint8 inData[1024];

Also this code is wrong:

(uint8*)TCHAR_TO_UTF8(serializedChar), size, sent)

as you have calculated size before converting it to UTF-8, and size should be the size of the converted string.