The client:
$socket->autoflush(1);
print $socket "abel\n";
print $socket "baker\n";
print $socket "charlie\n";
My question:
When the server’s select() (or can_read) completes, what guarantees do I have about the contents of the system receive buffer? Is it possible for it to contain a single “a”? Or “abel\nbak”? Or is the system buffer guaranteed to contain exactly one, two, or all three of the strings that were sent from corresponding ‘print’ statements in the client?
This obviously has implications about how I manage the application-level buffer.
No such guarantees with TCP (and SOCK_STREAM in general). Anything you listed is possible.