Package org.jruby.util.io

Examples of org.jruby.util.io.OpenFile.checkReadable()


        RubyIO io = (RubyIO)_io;
        OpenFile fptr;
//        ioctl_arg n;

        fptr = io.getOpenFileChecked();
        fptr.checkReadable(context);
        if (fptr.readPending() != 0) return runtime.getTrue();
        // TODO: better effort to get available bytes from our channel
//        if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qnil;
//        if (ioctl(fptr->fd, FIONREAD, &n)) return Qnil;
//        if (n > 0) return Qtrue;
View Full Code Here


        long tv;
//        struct timeval timerec;
//        struct timeval *tv;

        fptr = io.getOpenFileChecked();
        fptr.checkReadable(context);

        switch (argv.length) {
            case 1:
                timeout = argv[0];
                break;
View Full Code Here

    private ByteList doReceive(ThreadContext context, int length) {
        Ruby runtime = context.runtime;
        OpenFile fptr;

        fptr = getOpenFileChecked();
        fptr.checkReadable(context);

        ByteBuffer buf = ByteBuffer.allocate(length);

        try {
            context.getThread().beforeBlockingCall();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.