@Deprecated public IRubyObject getpeername() { return getpeername(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject getsockopt(IRubyObject lev, IRubyObject optname) { return getsockopt(getRuntime().getCurrentContext(), lev, optname); }
@Deprecated public IRubyObject recv(IRubyObject[] args) { return recv(getRuntime().getCurrentContext(), args); }
@Deprecated public IRubyObject recv(IRubyObject[] args) { return recv(getRuntime().getCurrentContext(), args); }
@Deprecated public IRubyObject setsockopt(IRubyObject lev, IRubyObject optname, IRubyObject val) { return setsockopt(getRuntime().getCurrentContext(), lev, optname, val); }
@Deprecated public IRubyObject getpeername() { return getpeername(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject getsockname() { return getsockname(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject setsockopt(IRubyObject lev, IRubyObject optname, IRubyObject val) { return setsockopt(getRuntime().getCurrentContext(), lev, optname, val); }
@Deprecated public IRubyObject getsockname() { return getsockname(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject getsockname() { return getsockname(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject recv(IRubyObject[] args) { return recv(getRuntime().getCurrentContext(), args); }
@Deprecated public IRubyObject getpeername() { return getpeername(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject getpeername() { return getpeername(getRuntime().getCurrentContext()); }
@Deprecated public IRubyObject recv(IRubyObject[] args) { return recv(getRuntime().getCurrentContext(), args); }
@Deprecated public IRubyObject getsockopt(IRubyObject lev, IRubyObject optname) { return getsockopt(getRuntime().getCurrentContext(), lev, optname); }
@Deprecated public IRubyObject getsockname() { return getsockname(getRuntime().getCurrentContext()); }
private int stringAsNumber(IRubyObject val) { ByteList str = val.convertToString().getByteList(); IRubyObject res = Pack.unpack(getRuntime(), str, FORMAT_SMALL_I).entry(0); if (res.isNil()) { throw getRuntime().newErrnoEINVALError(); } return RubyNumeric.fix2int(res); }
private int stringAsNumber(IRubyObject val) { ByteList str = val.convertToString().getByteList(); IRubyObject res = Pack.unpack(getRuntime(), str, FORMAT_SMALL_I).entry(0); if (res.isNil()) { throw getRuntime().newErrnoEINVALError(); } return RubyNumeric.fix2int(res); }
protected SocketAddress getRemoteSocket() { Channel channel = getOpenChannel(); SocketAddress address = SocketType.forChannel(channel).getRemoteSocketAddress(channel); if (address == null) throw getRuntime().newErrnoENOTCONNError(); return address; }
protected SocketAddress getRemoteSocket() { Channel channel = getOpenChannel(); SocketAddress address = SocketType.forChannel(channel).getRemoteSocketAddress(channel); if (address == null) throw getRuntime().newErrnoENOTCONNError(); return address; }