3 ms·
How would you handle requests that span more than one packet? The point of the "socket" abstraction is so that the kernel can make the arrival of packets - whi
by nostrademons 10y ago
How would you handle requests that span more than one packet?
The point of the "socket" abstraction is so that the kernel can make the arrival of packets - which may appear out-of-order, or not at all - seem like a continuous stream of data to the application. Get rid of the multiplexing, and you also get rid of the socket receive buffer. The application basically needs to implement a TCP layer in userspace.
BTW, UDP sockets provide exactly the abstraction you're looking for: the sending IP address is filled in along with the data, and there's no socket to wait on.