Package org.jruby.ext.socket
Class SocketUtils
java.lang.Object
org.jruby.ext.socket.SocketUtils
Socket class methods for addresses, structures, and so on.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
buildAddrinfoList
(ThreadContext context, IRubyObject[] args, boolean processLastArgAsReverse, org.jruby.ext.socket.SocketUtils.AddrinfoCallback callback) static IRubyObject
getaddress
(ThreadContext context, IRubyObject hostname) static IRubyObject
getaddrinfo
(ThreadContext context, IRubyObject[] args) Ruby definition would look like:getaddrinfoList
(ThreadContext context, IRubyObject[] args) 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 InetAddress
getRubyInetAddress
(byte[] addressBytes) static InetAddress
getRubyInetAddress
(String addressString) static InetAddress
getRubyInetAddress
(String host, String node) static InetAddress[]
getRubyInetAddresses
(String addressString) static InetAddress[]
getRubyInetAddresses
(ByteList address) Deprecated.static IRubyObject
getservbyname
(ThreadContext context, IRubyObject[] args) static IRubyObject
ip_address_list
(ThreadContext context) static boolean
isIPV4MappedAddressPrefix
(String address) static IRubyObject
pack_sockaddr_in
(ThreadContext context, IRubyObject port, IRubyObject host) Deprecated.static IRubyObject
pack_sockaddr_un
(ThreadContext context, IRubyObject filename) Deprecated.static int
portToInt
(IRubyObject port) Deprecated.static int
portToInt
(ThreadContext context, IRubyObject port) static RuntimeException
static RuntimeException
sockerr_with_trace
(Ruby runtime, String msg, StackTraceElement[] trace) static RubyArray
unpack_sockaddr_in
(ThreadContext context, IRubyObject addr) Deprecated.
-
Field Details
-
IP_V4_MAPPED_ADDRESS_PREFIX
- See Also:
-
-
Constructor Details
-
SocketUtils
public SocketUtils()
-
-
Method Details
-
gethostname
-
gethostbyaddr
-
getservbyname
-
pack_sockaddr_in
@Deprecated public static IRubyObject pack_sockaddr_in(ThreadContext context, IRubyObject port, IRubyObject host) Deprecated. -
unpack_sockaddr_in
Deprecated. -
pack_sockaddr_un
Deprecated. -
gethostbyname
-
getaddrinfo
Ruby definition would look like: def self.getaddrinfo(host, port, family = nil, socktype = nil, protocol = nil, flags = nil, reverse_lookup = nil) -
getaddrinfoList
-
buildAddrinfoList
public static void buildAddrinfoList(ThreadContext context, IRubyObject[] args, boolean processLastArgAsReverse, org.jruby.ext.socket.SocketUtils.AddrinfoCallback callback) -
getnameinfo
-
ip_address_list
-
getRubyInetAddresses
@Deprecated public static InetAddress[] getRubyInetAddresses(ByteList address) throws UnknownHostException Deprecated.- Throws:
UnknownHostException
-
getRubyInetAddresses
- Throws:
UnknownHostException
-
getRubyInetAddress
- Throws:
UnknownHostException
-
getRubyInetAddress
- Throws:
UnknownHostException
-
getRubyInetAddress
- Throws:
UnknownHostException
-
isIPV4MappedAddressPrefix
-
getaddress
-
sockerr
-
sockerr_with_trace
public static RuntimeException sockerr_with_trace(Ruby runtime, String msg, StackTraceElement[] trace) -
getPortFrom
-
portToInt
Deprecated. -
portToInt
-