TCP write와 segment 송신 경계가 수신 read 경계를 보장하지 않는다
한 번 write한 데이터가 여러 segment로 나뉘거나, 여러 write가 한 번 read로 합쳐질 수 있다.
App writehello + world앱 호출 경계
TCP sendseg A / seg BMSS, Nagle, buffer 영향
Receive buffer연속 byte queue순서 복원
App read원하는 크기만 읽음메시지 경계는 앱 책임
현상
왜 생김
대응
partial read
read 크기와 도착량 차이
length prefix
coalescing
여러 write가 합쳐짐
delimiter/protocol
split segment
MSS/혼잡/버퍼
stream parser