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.Data
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR
Fields 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, 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, varTableStamp
Fields 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) Addrinfo
(Ruby runtime, RubyClass cls, SocketAddress socketAddress, jnr.constants.platform.Sock sock, SocketType socketType, boolean displaysCanonical) -
Method Summary
Modifier and TypeMethodDescriptionafamily
(ThreadContext context) canonname
(ThreadContext context) static void
createAddrinfo
(ThreadContext context, RubyClass Object) static IRubyObject
getaddrinfo
(ThreadContext context, IRubyObject recv, IRubyObject[] args) getnameinfo
(ThreadContext context) getnameinfo
(ThreadContext context, int flags) getnameinfo
(ThreadContext context, IRubyObject flags) int
getPort()
jnr.unixsocket.UnixSocketAddress
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) inspect
(ThreadContext context) Returns a string containing a human-readable representation of obj.inspect_sockaddr
(ThreadContext context) static IRubyObject
ip
(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) 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_unique_local_p
(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) socktype
(ThreadContext context) static IRubyObject
tcp
(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 IRubyObject
udp
(ThreadContext context, IRubyObject recv, IRubyObject host, IRubyObject port) static IRubyObject
unix
(ThreadContext context, IRubyObject recv, IRubyObject path) static IRubyObject
unix
(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, dig, dig1, dig2, eqlInternal, equalInternal, equals, finishObjectClass, getNativeClassIndex, hashCode, inspect, op_eqq, puts, specificEval, toRubyString
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, eql_p, equal_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize, initialize_copy, initialize_copy, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal, op_match, op_not, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, to_s, to_s, toJava, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Field Details
-
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:
-
-
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
public Addrinfo(Ruby runtime, RubyClass cls, SocketAddress socketAddress, jnr.constants.platform.Sock sock, SocketType socketType, boolean displaysCanonical) -
Addrinfo
-
Addrinfo
-
-
Method Details
-
createAddrinfo
-
getPort
public int getPort() -
initialize
-
initialize
-
initialize
public IRubyObject initialize(ThreadContext context, IRubyObject _sockaddr, IRubyObject _family, IRubyObject _socktype) -
initialize
-
inspect
Description copied from class:RubyBasicObject
Returns a string containing a human-readable representation of obj. If not overridden, uses theto_s
method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"- Specified by:
inspect
in interfaceIRubyObject
- Overrides:
inspect
in classRubyBasicObject
-
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_unique_local_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
-
packet_inspect
-
getnameinfo
-
getnameinfo
-
getnameinfo
-
marshal_dump
-
marshal_load
-
to_str
-
getInet6Address
-
getInet4Address
-
getInetAddress
-
getSocketAddress
-
getInetSocketAddress
-
getUnixSocketAddress
public jnr.unixsocket.UnixSocketAddress getUnixSocketAddress() -
toString
Description copied from class:RubyObject
The default toString method is just a wrapper that calls the Ruby "to_s" method.- Overrides:
toString
in classRubyObject
- Returns:
- string representation
-