Package org.jruby.ext.socket
Class Addrinfo
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.ext.socket.Addrinfo
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<IRubyObject>,InstanceVariables,InternalVariables,IRubyObject,CoreObjectType
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.DataNested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final shortstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int(package private) final short(package private) final shortprivate booleanprivate Stringprivate booleanprivate NetworkInterface(package private) final byteprivate jnr.constants.platform.ProtocolFamilyprivate jnr.netdb.Protocolprivate jnr.constants.platform.Sockprivate SocketAddressprivate SocketTypeFields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATORFields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStampFields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionAddrinfo(Ruby runtime, RubyClass cls, InetAddress inetAddress) Addrinfo(Ruby runtime, RubyClass cls, InetAddress inetAddress, int port) Addrinfo(Ruby runtime, RubyClass cls, InetAddress inetAddress, int port, jnr.constants.platform.Sock sock) Addrinfo(Ruby runtime, RubyClass cls, NetworkInterface networkInterface, boolean isBroadcast) Addrinfo(Ruby runtime, RubyClass cls, SocketAddress socketAddress) Addrinfo(Ruby runtime, RubyClass cls, SocketAddress socketAddress, jnr.constants.platform.Sock sock, SocketType socketType) -
Method Summary
Modifier and TypeMethodDescriptionafamily(ThreadContext context) canonname(ThreadContext context) static voidcreateAddrinfo(Ruby runtime) (package private) jnr.constants.platform.AddressFamilystatic IRubyObjectgetaddrinfo(ThreadContext context, IRubyObject recv, IRubyObject[] args) getnameinfo(ThreadContext context, IRubyObject[] args) intgetPort()private static InetAddressgetRubyInetAddress(String node) private static InetAddressgetRubyInetAddress(String hostname, String node) private static InetAddressjnr.unixsocket.UnixSocketAddressprivate shorthatype()private byte[]hwaddr()initialize(ThreadContext context, IRubyObject _sockaddr) initialize(ThreadContext context, IRubyObject[] args) initialize(ThreadContext context, IRubyObject _sockaddr, IRubyObject _family) initialize(ThreadContext context, IRubyObject _sockaddr, IRubyObject _family, IRubyObject _socktype) private voidinitializeCommon(ThreadContext context, IRubyObject sockaddr, IRubyObject family, IRubyObject sock, IRubyObject port) inspect(ThreadContext context) inspect_sockaddr(ThreadContext context) private Stringstatic IRubyObjectip(ThreadContext context, IRubyObject recv, IRubyObject arg) ip_address(ThreadContext context) ip_p(ThreadContext context) ip_port(ThreadContext context) ip_unpack(ThreadContext context) ipv4_loopback_p(ThreadContext context) ipv4_multicast_p(ThreadContext context) ipv4_p(ThreadContext context) ipv4_private_p(ThreadContext context) private Stringipv6_ip()ipv6_linklocal_p(ThreadContext context) ipv6_loopback_p(ThreadContext context) ipv6_mc_global_p(ThreadContext context) ipv6_mc_linklocal_p(ThreadContext context) ipv6_mc_nodelocal_p(ThreadContext context) ipv6_mc_orglocal_p(ThreadContext context) ipv6_mc_sitelocal_p(ThreadContext context) ipv6_multicast_p(ThreadContext context) ipv6_p(ThreadContext context) ipv6_sitelocal_p(ThreadContext context) ipv6_to_ipv4(ThreadContext context) ipv6_unspecified_p(ThreadContext context) ipv6_v4compat_p(ThreadContext context) ipv6_v4mapped_p(ThreadContext context) marshal_dump(ThreadContext context) marshal_load(ThreadContext context, IRubyObject arg) pfamily(ThreadContext context) protocol(ThreadContext context) private voidsetSockAndProtocol(jnr.constants.platform.Sock sock) private voidsocktype(ThreadContext context) private intswapIntEndian(int i) private intswapShortEndian(short i) static IRubyObjecttcp(ThreadContext context, IRubyObject recv, IRubyObject host, IRubyObject port) to_sockaddr(ThreadContext context) to_str(ThreadContext context) toString()The default toString method is just a wrapper that calls the Ruby "to_s" method.static IRubyObjectudp(ThreadContext context, IRubyObject recv, IRubyObject host, IRubyObject port) static IRubyObjectunix(ThreadContext context, IRubyObject recv, IRubyObject path) static IRubyObjectunix(ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject type) unix_p(ThreadContext context) unix_path(ThreadContext context) Methods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, dig, dig1, dig2, eqlInternal, equalInternal, equals, getNativeClassIndex, hashCode, inspect, op_eqq, puts, specificEval, toRubyStringMethods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, ensureInstanceVariablesSettable, eql, eql_p, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, initialize19, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method, method_missing, method_missing19, method19, methods, methods, methods19, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal, op_equal_19, op_match, op_match19, op_not, op_not_equal, op_not_match, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method_added, singleton_method_added19, singleton_method_removed, singleton_method_removed19, singleton_method_undefined, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, to_s, toJava, trust, type, type_deprecated, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
-
Field Details
-
ARPHRD_ETHER
final short ARPHRD_ETHER- See Also:
-
ARPHRD_LOOPBACK
final short ARPHRD_LOOPBACK- See Also:
-
AF_PACKET
final short AF_PACKET- See Also:
-
PACKET_HOST
final byte PACKET_HOST- See Also:
-
AI_PASSIVE
public static final int AI_PASSIVE- See Also:
-
AI_CANONNAME
public static final int AI_CANONNAME- See Also:
-
AI_NUMERICHOST
public static final int AI_NUMERICHOST- See Also:
-
AI_NUMERICSERV
public static final int AI_NUMERICSERV- See Also:
-
AI_MASK
public static final int AI_MASK- See Also:
-
AI_ALL
public static final int AI_ALL- See Also:
-
AI_V4MAPPED_CFG
public static final int AI_V4MAPPED_CFG- See Also:
-
AI_ADDRCONFIG
public static final int AI_ADDRCONFIG- See Also:
-
AI_V4MAPPED
public static final int AI_V4MAPPED- See Also:
-
AI_DEFAULT
public static final int AI_DEFAULT- See Also:
-
socketAddress
-
pfamily
private jnr.constants.platform.ProtocolFamily pfamily -
sock
private jnr.constants.platform.Sock sock -
socketType
-
interfaceName
-
interfaceLink
private boolean interfaceLink -
networkInterface
-
isBroadcast
private boolean isBroadcast -
protocol
private jnr.netdb.Protocol protocol
-
-
Constructor Details
-
Addrinfo
-
Addrinfo
public Addrinfo(Ruby runtime, RubyClass cls, NetworkInterface networkInterface, boolean isBroadcast) -
Addrinfo
-
Addrinfo
public Addrinfo(Ruby runtime, RubyClass cls, InetAddress inetAddress, int port, jnr.constants.platform.Sock sock) -
Addrinfo
public Addrinfo(Ruby runtime, RubyClass cls, SocketAddress socketAddress, jnr.constants.platform.Sock sock, SocketType socketType) -
Addrinfo
-
Addrinfo
-
-
Method Details
-
createAddrinfo
-
getPort
public int getPort() -
initialize
-
initialize
-
initialize
public IRubyObject initialize(ThreadContext context, IRubyObject _sockaddr, IRubyObject _family, IRubyObject _socktype) -
initialize
-
initializeCommon
private void initializeCommon(ThreadContext context, IRubyObject sockaddr, IRubyObject family, IRubyObject sock, IRubyObject port) -
setSockAndProtocol
-
setSockAndProtocol
private void setSockAndProtocol(jnr.constants.platform.Sock sock) -
inspect
-
inspect_sockaddr
-
getaddrinfo
-
ip
-
tcp
public static IRubyObject tcp(ThreadContext context, IRubyObject recv, IRubyObject host, IRubyObject port) -
udp
public static IRubyObject udp(ThreadContext context, IRubyObject recv, IRubyObject host, IRubyObject port) -
unix
-
unix
public static IRubyObject unix(ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject type) -
afamily
-
pfamily
-
socktype
-
protocol
-
canonname
-
ipv4_p
-
ipv6_p
-
unix_p
-
ip_p
-
ip_unpack
-
ip_address
-
ip_port
-
ipv4_private_p
-
ipv4_loopback_p
-
ipv4_multicast_p
-
ipv6_unspecified_p
-
ipv6_loopback_p
-
ipv6_multicast_p
-
ipv6_linklocal_p
-
ipv6_sitelocal_p
-
ipv6_v4mapped_p
-
ipv6_v4compat_p
-
ipv6_mc_nodelocal_p
-
ipv6_mc_linklocal_p
-
ipv6_mc_sitelocal_p
-
ipv6_mc_orglocal_p
-
ipv6_mc_global_p
-
ipv6_to_ipv4
-
unix_path
-
to_sockaddr
-
hatype
private short hatype() -
hwaddr
private byte[] hwaddr() -
packet_inspect
-
swapIntEndian
private int swapIntEndian(int i) -
swapShortEndian
private int swapShortEndian(short i) -
ipv6_ip
-
inspectname
-
getRubyInetAddress
-
getRubyInetAddress
-
getRubyInetAddress
-
getnameinfo
-
marshal_dump
-
marshal_load
-
to_str
-
getInet6Address
-
getInet4Address
-
getInetAddress
-
getSocketAddress
-
getInetSocketAddress
-
getUnixSocketAddress
public jnr.unixsocket.UnixSocketAddress getUnixSocketAddress() -
toString
Description copied from class:RubyObjectThe default toString method is just a wrapper that calls the Ruby "to_s" method.- Overrides:
toStringin classRubyObject
-
getAddressFamily
jnr.constants.platform.AddressFamily getAddressFamily()
-