public boolean check_write ()
    {
        if (!out_active || state != State.active)
            return false;

        boolean full = hwm > 0 && msgs_written - peers_msgs_read == (long) (hwm);

        if (full) {
            out_active = false;
            return false;
        }

        return true;
    }