Did you know ... Search Documentation:
Predicate read_ok/3
 read_ok(+Stream, ?Code) is semidet[private]
 read_ok(+Stream, ?Code, -Lines) is semidet[private]
True if the server replies with Code. The version read_ok/3 returns the server comment lines, one atom per line. The numeric code has been stripped from the lines.