-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce 3DS MTU #14
Reduce 3DS MTU #14
Conversation
Guards AF_INET6 options for 3DS builds
Add 3DS configuration
Reduce 3DS MTU
unix.c
Outdated
@@ -469,7 +469,11 @@ enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) | |||
{ | |||
case ENET_SOCKOPT_ERROR: | |||
len = sizeof (int); | |||
#ifndef __3DS__ //getsockopt is unreliable on 3DS | |||
result = getsockopt (socket, SOL_SOCKET, SO_ERROR, value, & len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you seeing this codepath get reached during your testing? I don't see anything that calls it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen it reached, I just added in this fix for completeness once I noticed it. Removing it wouldn't cause any issues if you'd prefer keeping the original behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly do you mean when you say "getsockopt() is unreliable"? Are you talking about SO_ERROR
specifically or just any getsockopt()
call may fail randomly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically SO_ERROR, at least that's the only call that I've seen fail so far. Here's the related libctru issue if you're interested: devkitPro/libctru#412
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that will probably cause issues with moonlight-common-c, since we use SO_ERROR for non-blocking connects there too. I don't think ENet uses SO_ERROR, so can you remove this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it definitely caused issues with moonlight-common-c, it was how I first learned about this bug. Good to know this isn't a problem in enet though. Reverted!
getsockopt
on the 3DS (SO_ERROR
is unreliable)