I am implementing a server listening on some wide-open ports. Each
command to the server is at most 100 characters and seperated with
\n. I am reading them with IO.gets because it is very convenient. But
I am worried that a malicious client may overflow the IO.gets.

Beside dropping to IO.read or performing byte-by-byte read, is there
any other way to conveniently read at most 100 characters, terminated
with \n.

YS.