Download

FSocket::connect() always return false in android when NonBlocking is used.



ISocketSubsystem* SocketSubsystem = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM);
FSocket*pSocket = SocketSubsystem->CreateSocket(NAME_Stream, *Description, true);
bool bError = !pSocket->SetReuseAddr(false) ||
			!pSocket->SetLinger(false, 0) ||
			!pSocket->SetRecvErr() ||
			!pSocket->SetNonBlocking(true);

if (bError)
{
	UE_LOG(LogNetPeer, Error, TEXT("Failed to set socket attrib. (%s)"), *Endpoint.ToString());
    break;
}

RemoteEndpoint = Endpoint;

// *** Always return false in Android and Ios with NonBlocking.
bError = pSocket->Connect(*RemoteEndpoint.ToInternetAddr());


this is a bug?