Hello to the Haiku community
I am trying to port Moonlight Embedded to be able to stream video games from a PC to a client with Haiku, I managed to make it compile the project by eliminating some dependencies that are not entirely necessary.
Moonlight is capable of recognizing my PC, pairing, and also listing the video games I have installed.
But when I want to stream I get an error related to the sockets.
These are the messages it initially throws.
How do I know it’s something related to sockets? When reviewing the file
third_party\moonlight-common-c\src\PlatformSockets.c
I find the error messages.
The first: setsockopt(TCP_NOOPT, 1)
, I find it on line 489 when executing the instruction:
setsockopt(s, IPPROTO_TCP, TCP_NOOPT, (char*)&val, sizeof(val))
And the second error: connect() failed: -2147454932
, I find it on line 502, when executing the instruction:
err = connect(s, (struct sockaddr*) &addr, addrlen);
If I add the perror()
command below those lines I get the following error message:
connect(): : Socket operation on non-socket
I don’t have much knowledge of Sockets or how they are implemented in Haiku, but studying the function I have not found any unusual parameters, but I hope a more experienced developer can help me correct this problem.
I attach a link to the Github repo to replicate the problem:
moonlight-embedded
On the server computer you can install sunshine to make the connection