Hello , I got a problem when I open my App in iPad. It uses the UDP Communication in GitHub , and it works well in two windows computers’ communications. But when I package to iOS ,and open in iPad, it breaks down right now after I open it.
When I disable the following codes , my App will not break down in iPad. But communication function is disable too.
I would like suggest you to take a look of ISocketSubsystem::GetLastErrorCode() first.
Normally you may got error like EACCES, which means your app socket permission denied. Then you may have to check root access or there is another app using same address.
I have found the reason , and use a method to avoid this problem(it is not a good solution , and I will keep going on UDP and TCP communication problem).
What I do is to rewrite the UdpSocketBuilder.h and disable the following code :
Error = !Socket->SetMulticastLoopback(MulticastLoopback) || !Socket->SetMulticastTtl(MulticastTtl);
It seems that “Multicast” will lead to some problem in iOS, and I am not able to solve it now .So I have to avoid it.
And I rewrite the following codes:
if (Socket!=NULL)
{
int32 OutNewSize;
if (ReceiveBufferSize > 0)
{
Socket->SetReceiveBufferSize(ReceiveBufferSize, OutNewSize);
}
if (SendBufferSize > 0)
{
Socket->SetSendBufferSize(SendBufferSize, OutNewSize);
}
}
the above is all in MyUdpSocketBuilder.h which I copy from UdpSocketBuilder.h.
And I delete the function " WithBroadcast()" in UDPSender.cpp: