GithubHelp home page GithubHelp logo

iversc / lbnet Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.22 MB

Easy-to-use DLL for network access from Liberty BASIC

License: MIT License

C++ 35.27% C 1.88% Batchfile 1.97% HTML 0.07% BASIC 27.13% FreeBasic 33.68%

lbnet's People

Contributors

fearworksmedia avatar iversc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

fearworksmedia

lbnet's Issues

LBNet not working in Windows 11

I am finding that LBNet is not working in Windows 11, at least not when using it to act as a client. For example, usign LBNet to download a web page results in a connection error.

Creating listening socket seems to now be having IPv4/IPv6 issues

When creating a listening socket, to create a webserver for example, I just discovered on my Windows 10 and Windows 11 installs that the webserver would only respond on localhost. Trying 127.0.0.1 would not work, nor would the IPv4 address assigned to the PC. It looks like Windows has had some sort of update that, by default, is using IPv6 over IPv4, and the listening socket is defaulting to the IPv6 socket it finds first.

Sure enough when I change:

DWORD dwResult = getaddrinfo(NULL, pService, &hints, &result);

to:

DWORD dwResult = getaddrinfo("1.2.3.4", pService, &hints, &result);

to force the DLL to only look for that particular address, the listening socket is then created on that specific IP address.

I am guessing that at some point very recently Windows has changed from retrieving IPv4 information first by default, to retrieiving IPv6 information first by default, when using getaddrinfo.

To go along with this, I would propose adding functionality that retrieves a list of the IPv4 and IPv6 addressses on the system to allow the user to then choose and specify the one they want when creating the listening socket.

I will attempt to add a pull request with modified code but it may get ugly because I don't really know what I am doing... feel free to stop me, and correct me if anything I have said is inaccurate. It is my interpretation based on a few MSDN and Stackflow pages I have researched, and I may be misunderstanding, misinterpreting or just downright imagining stuff that isn't true.

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.