Convert libssh2's Direction into IOCondition