Conversation
Guards AF_INET6 options for 3DS builds
Add 3DS configuration
Reduce 3DS MTU
| 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.
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.
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.
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.
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.
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.
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!
getsockopton the 3DS (SO_ERRORis unreliable)