Examples of newErrnoENOPROTOOPTError()


Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

            } else if (channel instanceof DatagramChannel) {
                ((DatagramChannel)channel).connect(addr);

            } else {
                throw runtime.newErrnoENOPROTOOPTError();

            }

        } catch(AlreadyConnectedException e) {
            throw runtime.newErrnoEISCONNError();
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

            } else if (channel instanceof DatagramChannel) {
                DatagramSocket socket = ((DatagramChannel)channel).socket();
                socket.bind(iaddr);

            } else {
                throw runtime.newErrnoENOPROTOOPTError();
            }

        } catch(UnknownHostException e) {
            throw SocketUtils.sockerr(runtime, "bind(2): unknown host");
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

            case SOL_IP:
            case SOL_TCP:
            case SOL_UDP:

                if (opt == SocketOption.__UNKNOWN_CONSTANT__) {
                    throw runtime.newErrnoENOPROTOOPTError();
                }

                value = SocketType.forChannel(channel).getSocketOption(channel, opt);
               
                if (runtime.is1_9()) {
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

                } else {
                    return number(runtime, SocketType.forChannel(channel).getSocketOption(channel, opt));
                }

            default:
                throw runtime.newErrnoENOPROTOOPTError();
            }

        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();

        } catch(IOException e) {
            throw runtime.newErrnoENOPROTOOPTError();
        }
    }

    @JRubyMethod
    public IRubyObject setsockopt(ThreadContext context, IRubyObject _level, IRubyObject _opt, IRubyObject val) {
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

                    if (MulticastStateManager.IP_ADD_MEMBERSHIP == intOpt) {
                        joinMulticastGroup(val);
                    }

                } else {
                    throw runtime.newErrnoENOPROTOOPTError();
                }
            }

        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();

        } catch(IOException e) {
            throw runtime.newErrnoENOPROTOOPTError();
        }
        return runtime.newFixnum(0);
    }

    @JRubyMethod(name = "getsockname")
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

                rubySocket.initFromServer(runtime, this, socket);

                return rubySocket;

            } else {
                throw runtime.newErrnoENOPROTOOPTError();
            }

        } catch (IllegalBlockingModeException ibme) {
            // indicates that no connection is available in non-blocking mode
            throw runtime.newErrnoEAGAINReadableError("accept(2) would block");
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

            if (channel instanceof ServerSocketChannel) {
                ServerSocket socket = ((ServerSocketChannel)channel).socket();
                socket.bind(iaddr, backlog);

            } else {
                throw runtime.newErrnoENOPROTOOPTError();
            }

        } catch(UnknownHostException e) {
            throw SocketUtils.sockerr(runtime, "bind(2): unknown host");
View Full Code Here

Examples of org.jruby.Ruby.newErrnoENOPROTOOPTError()

                rubySocket.initFromServer(runtime, this, socket);

                return rubySocket;

            } else {
                throw runtime.newErrnoENOPROTOOPTError();
            }

        } catch (IllegalBlockingModeException ibme) {
            // indicates that no connection is available in non-blocking mode
            throw runtime.newErrnoEAGAINReadableError("accept(2) would block");
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.