から read する様子を観測できます Hello, World! TCP通信とシステムコール 42 $ strace -f -p <pid> ––trace=socket,bind,listen,accept4,poll,read,write ... poll([{fd=0, events=POLLIN}, {fd=4, events=0}, {fd=4, events=POLLIN}, {fd=1, events=0}], 4, -1) = 1 ([{fd=4, revents=POLLIN}]) read(4, "Hello, World!\n", 16384) = 14 poll([{fd=0, events=POLLIN}, {fd=4, events=0}, {fd=4, events=POLLIN}, {fd=1, events=POLLOUT}], 4, -1) = 1 ([{fd=1, revents=POLLOUT}]) write(1, "Hello, World!\n", 14) = 14 poll([{fd=0, events=POLLIN}, {fd=4, events=0}, {fd=4, events=POLLIN}, {fd=1, events=0}], 4, -1 $ netcat localhost 3000 Hello, World! $ netcat -k -l 3000 Hello, World!