GithubHelp home page GithubHelp logo

Comments (7)

fearworksmedia avatar fearworksmedia commented on September 28, 2024

I have been looking to this further and I stumbled upon this page:

https://stackoverflow.com/questions/69856792/winsock-connect-fails-with-wsaefault-error-on-windows-11-only/69859627

I changed all instance of AF_UNSPEC to AF_INET just to test with IPv4 only and it seems to work. I'm not claiming I've found the problem as there may be more to it than I can fathom, but this certainly seems to be along the right lines. I guess implementing the dual-stack socket rather than using AF_UNSPEC might be necessary to make the DLL compatible with Windows 11?

from lbnet.

iversc avatar iversc commented on September 28, 2024

Looks like I'm actually misusing AF_UNSPEC when creating the socket - it's only supposed to be used for the call to getaddrinfo(), as far as I can tell, now.

I'll see if I can get a quick correction for this.

from lbnet.

fearworksmedia avatar fearworksmedia commented on September 28, 2024

Sounds good, I can test on my Windows 11 VM as soon as you think it might be sorted :)

from lbnet.

iversc avatar iversc commented on September 28, 2024

Do you want me to make a build for you? Or do you want to just pull the code and compile or yourself? Or make the change yourself and build, there's only two lines that actually need to change to fix this.

If you want to do it yourself, there's two lines in LBNet.cpp that are both:

s = socket(AF_UNSPEC, socktype, protocol);

Just replace both lines with the following:

s = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);

EDIT: clipboard failed to copy.

from lbnet.

fearworksmedia avatar fearworksmedia commented on September 28, 2024

I'll give it a go now, I can change and build and let you know the result. Give me a few mins.

from lbnet.

fearworksmedia avatar fearworksmedia commented on September 28, 2024

I can confirm that seems to have sorted the issue. It seems to be fine on Windows 11 now and I'm not seeing the connection error at all.

Time for a new release :)

from lbnet.

fearworksmedia avatar fearworksmedia commented on September 28, 2024

Been using this now for a few days on Windows 11 and have had no issues. That fix has definitely sorted the issue I was experiencing.

from lbnet.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.