[Live-devel] Socket creation issue with android-ndk-r15c and above.
Kuldeep More
kuldeep.more at intelli-vision.com
Mon Feb 26 22:52:28 PST 2018
Hi Ross,
Any update on this ?
Thanks and Regards,
Kuldeep more
On Mon, Feb 26, 2018 at 1:15 PM, Kuldeep More <
kuldeep.more at intelli-vision.com> wrote:
> Hello Ross,
>
> Which specific piece of the code that implements the
> “setupDatagramSocket()” function (lines 96 to 175 of
> “groupsock/GroupsockHelper.cpp” is failing, and why. Remember, You Have
> Complete Source Code.
>
> I got the line which was causing the issue actually it is not the line it
> is code block
>
> #if defined(__WIN32__) || defined(_WIN32)
> // Windoze doesn't properly handle SO_REUSEPORT or IP_MULTICAST_LOOP
> #else
> #ifdef SO_REUSEPORT
> if (setsockopt(newSocket, SOL_SOCKET, SO_REUSEPORT,
> (const char*)&reuseFlag, sizeof reuseFlag) < 0) {
> socketErr(env, "setsockopt(SO_REUSEPORT) error: ");
> closeSocket(newSocket);
> return -1;
> }
> #endif
>
> From this code I was getting error no *92* and error string
> *Protocol not available.*The setsockopt was causing the above issue.
>
> If you look at the code above which is in condition compilation.
> Also in the whole code we have not defined SO_REUSEPORT still it was
> executing and giving error *setsockopt(SO_REUSEPORT) error: Protocol not
> available.*
> I don't understand why the above code is executing.
>
> For try out I have commented the above code and guess what I am able to
> see steaming on my device which was previously not able to steam.
> If you know why this happening please let me know.
>
> Thanks and regards,
> Kuldeep More
>
>
>
>
>
>
>
>
>
>
>
> On Fri, Feb 23, 2018 at 7:11 PM, Ross Finlayson <finlayson at live555.com>
> wrote:
>
>>
>>
>> > On Feb 23, 2018, at 10:36 PM, Kuldeep More <
>> kuldeep.more at intelli-vision.com> wrote:
>> >
>> > Hello Ross,
>> >
>> > Why is your call to “setupDatagramSocket()” failing?
>> >
>> > Now I have added some extra logs in “setupDatagramSocket()”.
>> > From the logs socket error number I am getting is 92 and error string
>> is Protocol not available.
>>
>> No, what I meant was:
>> Which specific piece of the code that implements the
>> “setupDatagramSocket()” function (lines 96 to 175 of
>> “groupsock/GroupsockHelper.cpp” is failing, and why. Remember, You Have
>> Complete Source Code.
>>
>>
>> > Also found that on some devices it is working fine. But on some devices
>> it is not working.
>>
>> By default, the server uses the network interface that’s used for IP
>> multicast routing - i.e., the one that has a route for 224.0.0.0/4.
>> (The reason for this is that it uses IP multicast to detect its own IP
>> address.)
>>
>> So, the easiest way to choose a particular network interface is to
>> reconfigure your host so that it uses that network interface for IP
>> multicast routing. You should be able to do this by running (as root):
>> route add 224.0.0.0/4 ip-address-for-that-nic
>>
>> Ross Finlayson
>> Live Networks, Inc.
>> http://www.live555.com/
>>
>>
>> _______________________________________________
>> live-devel mailing list
>> live-devel at lists.live555.com
>> http://lists.live555.com/mailman/listinfo/live-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20180227/6f1155c4/attachment.html>
More information about the live-devel
mailing list