I am looking for something similar to memory mapping a file. It would make the virtual memory match the output of the socket byte-to-byte, and would block when no new bytes have been received. Is this possible?
I am looking specifically for a solution for Rust, but if anyone knows another language that has a feature like this, I might be able to interface with it.
No. It doesn't make sense. A socket is not a random access device, and the length of the mapping is undefined.