![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@ndn/autoconfig
Advanced tools
This package is part of NDNts, Named Data Networking libraries for the modern web.
This package enables connection to global NDN testbed using NDN-FCH service.
import { queryFch, connectToTestbed } from "@ndn/autoconfig";
// other imports for examples
import { Forwarder } from "@ndn/fw";
import { Name } from "@ndn/packet";
import { strict as assert } from "assert";
(async () => {
if (process.env.CI) { return; }
queryFch
function sends a query to NDN-FCH service.
// The simplest query:
let hosts = await queryFch();
assert.equal(hosts.length, 1);
console.log("closest HUB", hosts);
// Ask for multiple routers:
hosts = await queryFch({ count: 4 });
assert(hosts.length > 1);
console.log("four routers", hosts);
// Ask for secure WebSocket capability:
hosts = await queryFch({ capabilities: ["wss"] });
console.log("supports secure WebSocket", hosts);
// Ask for router at specific location:
hosts = await queryFch({ position: [121.403351, 31.007990] }); // eslint-disable-line unicorn/no-zero-fractions
console.log("near @yoursunny's birthplace", hosts);
const fw = Forwarder.create();
// Create up to four faces, and consider default IPv4 gateway as a candidate.
// In case NDN-FCH is unavailable, use a list of backup routers.
let faces = await connectToTestbed({
count: 4,
fw,
tryDefaultGateway: true,
fchFallback: ["hobo.cs.arizona.edu", "titan.cs.memphis.edu"],
});
assert(faces.length >= 1);
faces.forEach((face) => {
console.log("connected to", `${face}`);
face.close();
});
// Try up to four candidates with 3-second timeout, and keep the fastest face only.
faces = await connectToTestbed({
count: 4,
fw,
preferFastest: true,
connectTimeout: 3000,
testConnection: new Name(`/ndn/edu/arizona/ping/${Math.floor(Math.random() * 99999999)}`),
tryDefaultGateway: false,
});
assert.equal(faces.length, 1);
faces.forEach((face) => {
console.log("fastest face is", `${face}`);
face.close();
});
})();
FAQs
NDNts: automatic connection establishment
We found that @ndn/autoconfig demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.