Examples of newErrnoEAGAINError()


Examples of org.jruby.Ruby.newErrnoEAGAINError()

            if (!blocking && !ready) {
                Ruby runtime = getRuntime();

                throw runtime.is1_9() ?
                        runtime.newErrnoEAGAINWritableError("Resource temporarily unavailable") :
                        runtime.newErrnoEAGAINError("Resource temporarily unavailable");
            }

            // otherwise, proceed as before

            switch (hsStatus) {
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEAGAINError()

        if (bytes == null) {
            if (runtime.is1_9()) {
                throw runtime.newErrnoEAGAINReadableError("recvfrom(2)");
            } else {
                throw runtime.newErrnoEAGAINError("recvfrom(2)");
            }
        }

        return RubyString.newString(runtime, bytes);
    }
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEAGAINError()

        if (!(channel instanceof SelectableChannel)) {
            if (runtime.is1_9()) {
                throw runtime.newErrnoEAGAINReadableError(channel.getClass().getName() + " does not support nonblocking");
            } else {
                throw runtime.newErrnoEAGAINError(channel.getClass().getName() + " does not support nonblocking");
            }
        }

        SelectableChannel selectable = (SelectableChannel)channel;
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEAGAINError()

                boolean ready = context.getThread().select(this, SelectionKey.OP_ACCEPT, 0);

                if (!ready) {
                    // no connection immediately accepted, let them try again
                    throw runtime.newErrnoEAGAINError("Resource temporarily unavailable");

                } else {
                    // otherwise one key has been selected (ours) so we get the channel and hand it off
                    socket.initSocket(context.runtime, new ChannelDescriptor(ssc.accept(), newModeFlags(runtime, ModeFlags.RDWR)));
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEAGAINError()

            } catch (IOException ioe) {
                if (ioe.getMessage().equals("accept failed: Resource temporarily unavailable")) {
                    if (runtime.is1_9()) {
                        throw runtime.newErrnoEAGAINReadableError("accept");
                    } else {
                        throw runtime.newErrnoEAGAINError("accept");
                    }
                }

                throw context.runtime.newIOErrorFromException(ioe);
            }
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEAGAINError()

                boolean ready = context.getThread().select(this, SelectionKey.OP_ACCEPT, 0);

                if (!ready) {
                    // no connection immediately accepted, let them try again
                    throw runtime.newErrnoEAGAINError("Resource temporarily unavailable");

                } else {
                    // otherwise one key has been selected (ours) so we get the channel and hand it off
                    socket.initSocket(newChannelFD(runtime, ssc.accept()));
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.