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 voidbuildAddrinfoList(ThreadContext context, IRubyObject[] args, boolean processLastArgAsReverse, org.jruby.ext.socket.SocketUtils.AddrinfoCallback callback) static IRubyObjectgetaddress(ThreadContext context, IRubyObject hostname) static IRubyObjectgetaddrinfo(ThreadContext context, IRubyObject[] args) Ruby definition would look like:getaddrinfoList(ThreadContext context, IRubyObject[] args) static IRubyObjectgethostbyaddr(ThreadContext context, IRubyObject[] args) static IRubyObjectgethostbyname(ThreadContext context, IRubyObject hostname) static IRubyObjectgethostname(ThreadContext context) static IRubyObjectgetnameinfo(ThreadContext context, IRubyObject[] args) static intgetPortFrom(ThreadContext context, IRubyObject _port) static InetAddressgetRubyInetAddress(byte[] addressBytes) static InetAddressgetRubyInetAddress(String addressString) static InetAddressgetRubyInetAddress(String host, String node) static InetAddress[]getRubyInetAddresses(String addressString) static InetAddress[]getRubyInetAddresses(ByteList address) Deprecated.static IRubyObjectgetservbyname(ThreadContext context, IRubyObject[] args) static IRubyObjectip_address_list(ThreadContext context) static booleanisIPV4MappedAddressPrefix(String address) static IRubyObjectpack_sockaddr_in(ThreadContext context, IRubyObject port, IRubyObject host) Deprecated.static IRubyObjectpack_sockaddr_un(ThreadContext context, IRubyObject filename) Deprecated.static intportToInt(IRubyObject port) Deprecated.static intportToInt(ThreadContext context, IRubyObject port) static RuntimeExceptionstatic RuntimeExceptionsockerr_with_trace(Ruby runtime, String msg, StackTraceElement[] trace) static RubyArrayunpack_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
-