TCP provides a stream of bytes. You need to do your own record delimiting. readline works because it waits until a delimiter is found.
If you need a sysread version (perhaps so you can use select), see Re^3: Can a socket listen for multiple hosts? for an example.
In reply to Re^3: IO Socket buffer flushing
by ikegami
in thread IO Socket buffer flushing
by baldeep8
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |