public class SocketUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
SocketUtils.AddrinfoCallback |
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
ANY |
private static java.lang.String |
BROADCAST |
private static byte[] |
INADDR_ANY |
private static byte[] |
INADDR_BROADCAST |
private static int |
IPV4_HOST_GROUP |
private static int |
IPV4_PORT_GROUP |
private static java.util.regex.Pattern |
STRING_IPV4_ADDRESS_PATTERN |
| Constructor and Description |
|---|
SocketUtils() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static jnr.constants.platform.AddressFamily |
addressFamilyFromArg(IRubyObject domain) |
static void |
buildAddrinfoList(ThreadContext context,
IRubyObject[] args,
SocketUtils.AddrinfoCallback callback) |
static IRubyObject |
getaddress(ThreadContext context,
IRubyObject hostname) |
static IRubyObject |
getaddrinfo(ThreadContext context,
IRubyObject[] args)
Ruby definition would look like:
def self.getaddrinfo(host, port, family = nil, socktype = nil, protocol = nil, flags = nil, reverse_lookup = nil)
|
static java.util.List<Addrinfo> |
getaddrinfoList(ThreadContext context,
IRubyObject[] args) |
private static java.lang.String |
getHostAddress(ThreadContext context,
java.net.InetAddress addr) |
private static java.lang.String |
getHostAddress(ThreadContext context,
java.net.InetAddress addr,
java.lang.Boolean reverse) |
static IRubyObject |
gethostbyaddr(ThreadContext context,
IRubyObject[] args) |
static IRubyObject |
gethostbyname(ThreadContext context,
IRubyObject hostname) |
static IRubyObject |
gethostname(ThreadContext context) |
static IRubyObject |
getnameinfo(ThreadContext context,
IRubyObject[] args) |
static int |
getPortFrom(ThreadContext context,
IRubyObject _port) |
static java.net.InetAddress |
getRubyInetAddress(org.jruby.util.ByteList address) |
static IRubyObject |
getservbyname(ThreadContext context,
IRubyObject[] args) |
static IRubyObject |
ip_address_list(ThreadContext context) |
static IRubyObject |
pack_sockaddr_in(ThreadContext context,
IRubyObject port,
IRubyObject host) |
static IRubyObject |
pack_sockaddr_un(ThreadContext context,
IRubyObject filename) |
static int |
portToInt(IRubyObject port) |
(package private) static jnr.constants.platform.ProtocolFamily |
protocolFamilyFromArg(IRubyObject protocol) |
(package private) static jnr.netdb.Protocol |
protocolFromArg(IRubyObject protocol) |
static java.lang.RuntimeException |
sockerr(Ruby runtime,
java.lang.String msg) |
(package private) static jnr.constants.platform.Sock |
sockFromArg(IRubyObject type) |
static IRubyObject |
unpack_sockaddr_in(ThreadContext context,
IRubyObject addr) |
private static final java.util.regex.Pattern STRING_IPV4_ADDRESS_PATTERN
private static final int IPV4_HOST_GROUP
private static final int IPV4_PORT_GROUP
private static final java.lang.String BROADCAST
private static final byte[] INADDR_BROADCAST
private static final java.lang.String ANY
private static final byte[] INADDR_ANY
public static IRubyObject gethostname(ThreadContext context)
public static IRubyObject gethostbyaddr(ThreadContext context, IRubyObject[] args)
public static IRubyObject getservbyname(ThreadContext context, IRubyObject[] args)
public static IRubyObject pack_sockaddr_in(ThreadContext context, IRubyObject port, IRubyObject host)
public static IRubyObject unpack_sockaddr_in(ThreadContext context, IRubyObject addr)
public static IRubyObject pack_sockaddr_un(ThreadContext context, IRubyObject filename)
public static IRubyObject gethostbyname(ThreadContext context, IRubyObject hostname)
public static IRubyObject getaddrinfo(ThreadContext context, IRubyObject[] args)
public static java.util.List<Addrinfo> getaddrinfoList(ThreadContext context, IRubyObject[] args)
public static void buildAddrinfoList(ThreadContext context, IRubyObject[] args, SocketUtils.AddrinfoCallback callback)
public static IRubyObject getnameinfo(ThreadContext context, IRubyObject[] args)
public static IRubyObject ip_address_list(ThreadContext context)
public static java.net.InetAddress getRubyInetAddress(org.jruby.util.ByteList address)
throws java.net.UnknownHostException
java.net.UnknownHostExceptionpublic static IRubyObject getaddress(ThreadContext context, IRubyObject hostname)
public static java.lang.RuntimeException sockerr(Ruby runtime, java.lang.String msg)
public static int getPortFrom(ThreadContext context, IRubyObject _port)
private static java.lang.String getHostAddress(ThreadContext context, java.net.InetAddress addr, java.lang.Boolean reverse)
private static java.lang.String getHostAddress(ThreadContext context, java.net.InetAddress addr)
static jnr.constants.platform.AddressFamily addressFamilyFromArg(IRubyObject domain)
static jnr.constants.platform.Sock sockFromArg(IRubyObject type)
static jnr.constants.platform.ProtocolFamily protocolFamilyFromArg(IRubyObject protocol)
static jnr.netdb.Protocol protocolFromArg(IRubyObject protocol)
public static int portToInt(IRubyObject port)