This feels so ham fisted to me. Why not just open /net/tcp/127.0.0.1/80? I am sure there are reasons, but if the goal is to make everything a file, this feels like a more natural representation.
This feels so ham fisted to me. Why not just open /net/tcp/127.0.0.1/80? I am sure there are reasons, but if the goal is to make everything a file, this feels like a more natural representation.
Sure, you could script opening each address of the entire address space and have an unfortunate situation, but you don’t get that by default when you simply query what exists.
That said, it’s been a veeeery long time since I tried out Plan9 and Inferno.
Magic indeed.
Yes, though this could have been achieved with a bunch of sysfs-like entries under /net/tcp/127.0.0.1/80/<port>/ with the added benefit of being easily discoverable.
> It would also be unfortunate to run ls in /net/tcp and dump the entire IPv4/6 space into your terminal.
A reasonable semantics here would be to only list hosts to which there are active connections.
They're optimizing for as few syscalls as possible, I suppose, but in Plan 9 you still create pipes with pipe(), not by writing to a special file. And if you already have pipe(), why not socket()?
The approach would be Linux-y but probbly not enough according to 9p standards.