iversc / lbnet Goto Github PK
View Code? Open in Web Editor NEWEasy-to-use DLL for network access from Liberty BASIC
License: MIT License
Easy-to-use DLL for network access from Liberty BASIC
License: MIT License
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.