#
d8b0539e |
|
10-Aug-2016 |
Carlos Pizano <cpu@google.com> |
[kernel][magenta] Sockets (part 1) Sockets are connected, bidirectional, waitable transports that can move only data, and have a maximum capacity. They are useful for stream transports, pipes, etc. This CL only introduces the basic constructs and the following syscalls: sys_socket_create() : returns two handles, one for each end of the socket. Both sides behave in the same manner. sys_socket_read() and sys_socket_write(), to read and write data, in byte stream form. Unlike the message pipe and the data pipe, the socket does not have a central object of which both sides are just interfaces, instead both dispatchers hold the write circular buffer and rely on the new on_zero_handles() callback to manage the lifetime. Change-Id: I8fbfedde399cf9a7f129370bbc26b99b33ce53fe
|