org.jruby.ext.socket
Class RubySocket

java.lang.Object
  extended by org.jruby.RubyBasicObject
      extended by org.jruby.RubyObject
          extended by org.jruby.RubyIO
              extended by org.jruby.ext.socket.RubyBasicSocket
                  extended by org.jruby.ext.socket.RubySocket
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType

public class RubySocket
extends RubyBasicSocket

Author:
Ola Bini
See Also:
Serialized Form

Nested Class Summary
static class RubySocket.Constants
           
static class RubySocket.Service
           
static class RubySocket.SocketError
           
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.ObjectMethods
 
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.BasicObjectMethods, RubyBasicObject.Finalizer, RubyBasicObject.VariableTableEntry
 
Field Summary
static int AF_INET
           
static int AF_INET6
           
static int AF_IPX
           
static int AF_UNIX
           
static int AF_UNSPEC
           
static int IPPROTO_ICMP
           
static int IPPROTO_IP
           
static int IPPROTO_TCP
           
static int IPPROTO_UDP
           
static int MSG_DONTROUTE
           
static int MSG_OOB
           
static int MSG_PEEK
           
static int NI_DGRAM
           
static int NI_MAXHOST
           
static int NI_MAXSERV
           
static int NI_NAMEREQD
           
static int NI_NOFQDN
           
static int NI_NUMERICHOST
           
static int NI_NUMERICSERV
           
static int PF_INET
           
static int PF_IPX
           
static int PF_UNIX
           
static int PF_UNSPEC
           
static int SO_BROADCAST
           
static int SO_DEBUG
           
static int SO_DONTROUTE
           
static int SO_ERROR
           
static int SO_KEEPALIVE
           
static int SO_LINGER
           
static int SO_OOBINLINE
           
static int SO_RCVBUF
           
static int SO_RCVLOWAT
           
static int SO_RCVTIMEO
           
static int SO_REUSEADDR
           
static int SO_SNDBUF
           
static int SO_SNDLOWAT
           
static int SO_SNDTIMEO
           
static int SO_TIMESTAMP
           
static int SO_TYPE
           
static int SOCK_DGRAM
           
static int SOCK_RAW
           
static int SOCK_RDM
           
static int SOCK_SEQPACKET
           
static int SOCK_STREAM
           
static int SOL_IP
           
static int SOL_SOCKET
           
static int SOL_TCP
           
static int SOL_UDP
           
 
Fields inherited from class org.jruby.RubyIO
blockingThreads, filenoIndex, openFile
 
Fields inherited from class org.jruby.RubyObject
OBJECT_ALLOCATOR
 
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, dataStruct, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, VARIABLE_TABLE_DEFAULT_CAPACITY, VARIABLE_TABLE_EMPTY_TABLE, VARIABLE_TABLE_LOAD_FACTOR, VARIABLE_TABLE_MAXIMUM_CAPACITY, variableTable, variableTableSize, variableTableThreshold
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubySocket(Ruby runtime, RubyClass type)
           
 
Method Summary
static IRubyObject for_fd(IRubyObject socketClass, IRubyObject fd)
          Deprecated. 
static IRubyObject for_fd(ThreadContext context, IRubyObject socketClass, IRubyObject fd)
           
static IRubyObject getaddrinfo(IRubyObject recv, IRubyObject[] args)
          Deprecated. 
static IRubyObject getaddrinfo(ThreadContext context, IRubyObject recv, IRubyObject[] args)
           
static IRubyObject gethostbyaddr(IRubyObject recv, IRubyObject[] args)
          Deprecated. 
static IRubyObject gethostbyaddr(ThreadContext context, IRubyObject recv, IRubyObject[] args)
           
static IRubyObject gethostbyname(IRubyObject recv, IRubyObject hostname)
          Deprecated. 
static IRubyObject gethostbyname(ThreadContext context, IRubyObject recv, IRubyObject hostname)
           
static IRubyObject gethostname(IRubyObject recv)
          Deprecated. 
static IRubyObject gethostname(ThreadContext context, IRubyObject recv)
           
static IRubyObject getnameinfo(IRubyObject recv, IRubyObject[] args)
          Deprecated. 
static IRubyObject getnameinfo(ThreadContext context, IRubyObject recv, IRubyObject[] args)
           
static IRubyObject getservbyname(IRubyObject recv, IRubyObject[] args)
          Deprecated. 
static IRubyObject getservbyname(ThreadContext context, IRubyObject recv, IRubyObject[] args)
           
protected  int getSoTypeDefault()
           
 IRubyObject initialize(ThreadContext context, IRubyObject domain, IRubyObject type, IRubyObject protocol)
           
static IRubyObject pack_sockaddr_in(IRubyObject recv, IRubyObject port, IRubyObject host)
          Deprecated. 
static IRubyObject pack_sockaddr_in(ThreadContext context, IRubyObject recv, IRubyObject port, IRubyObject host)
           
static IRubyObject pack_sockaddr_un(IRubyObject recv, IRubyObject filename)
          Deprecated. 
static IRubyObject pack_sockaddr_un(ThreadContext context, IRubyObject recv, IRubyObject filename)
           
static IRubyObject unpack_sockaddr_in(IRubyObject recv, IRubyObject addr)
          Deprecated. 
static IRubyObject unpack_sockaddr_in(ThreadContext context, IRubyObject recv, IRubyObject addr)
           
 
Methods inherited from class org.jruby.ext.socket.RubyBasicSocket
asBoolean, close_read, close_write, do_not_reverse_lookup, getLocalSocket, getpeername, getpeername, getRemoteSocket, getsockname, getsockname, getsockopt, getsockopt, initSocket, recv, recv, set_do_not_reverse_lookup, setsockopt, setsockopt, shutdown, write_send
 
Methods inherited from class org.jruby.RubyIO
addBlockingThread, binmode, checkClosed, checkInitialized, close, close2, closed_p, copy_stream, createIOClass, ctl, each_byte, each_byte19, each_line, each_line19, each19, eof_p, fcntl, fdopen, fileno, flush, foreach, foreach19, fsync, fwrite, getBlocking, getc, getChannel, getDescriptorByFileno, getHandler, getInStream, getIOModes, getIOModesIntFromString, getline, getlineFast, getNewFileno, getOpenFile, getOpenFileChecked, getOutStream, gets, initialize_copy, initialize, interruptBlockingThreads, ioctl, lineno_set, lineno, newInstance, newIO, op_append, open, pid, pipe, popen, popen3, pos_set, pos, print, printf, putc, puts, read_nonblock, read, read, read, read, read, read, read, read, readAll, readchar, readline, readlines, readlines, readpartial, registerDescriptor, removeBlockingThread, reopen, rewind, seek, seek, seek, select_static, select, stat, swallow, sync_set, sync, sysread, sysseek, syswrite, to_io, toString, tty_p, ungetc, unregisterDescriptor, waitReadable, waitWritable, write_nonblock, write, write, writeDataBuffered
 
Methods inherited from class org.jruby.RubyObject
as, attachToObjectSpace, callInit, checkFrozen, convertToType, createObjectClass, display, dup, eql_p, eqlInternal, equal_p, equalInternal, equals, evalUnder, evalUnder, extend, freeze, frozen_p, getNativeTypeIndex, hash, hashCode, id_deprecated, id, initialize, inspect, 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, kind_of_p, method, methods, nil_p, op_eqq, op_equal, op_match, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, respond_to_p, respond_to_p, send, send, send, send, send, singleton_methods, singleton_methods19, singletonMethods, specificEval, specificEval, specificEval, specificEval, specificEval, taint, tainted_p, to_a, to_java, to_s, type_deprecated, type, untaint, validateInstanceVariable
 
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkStringType, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataWrapStruct, ensureInstanceVariablesSettable, eql, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, getFlag, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariableList, getInternalVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariableCount, getVariableList, getVariableMap, getVariableNameList, hasInstanceVariable, hasInternalVariable, hasVariables, infectBy, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isRubyVariable, isTaint, isTrue, makeMetaClass, op_not_equal, op_not, removeFinalizers, removeInstanceVariable, removeInternalVariable, respondsTo, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setTaint, syncVariables, taint, testFrozen, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableGetMap, variableTableGetMap, variableTableGetSize, variableTableGetTable, variableTableReadLocked, variableTableRehash, variableTableRemove, variableTableStore, variableTableSync
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NI_DGRAM

public static final int NI_DGRAM
See Also:
Constant Field Values

NI_MAXHOST

public static final int NI_MAXHOST
See Also:
Constant Field Values

NI_MAXSERV

public static final int NI_MAXSERV
See Also:
Constant Field Values

NI_NAMEREQD

public static final int NI_NAMEREQD
See Also:
Constant Field Values

NI_NOFQDN

public static final int NI_NOFQDN
See Also:
Constant Field Values

NI_NUMERICHOST

public static final int NI_NUMERICHOST
See Also:
Constant Field Values

NI_NUMERICSERV

public static final int NI_NUMERICSERV
See Also:
Constant Field Values

SOL_IP

public static final int SOL_IP
See Also:
Constant Field Values

SOL_SOCKET

public static final int SOL_SOCKET
See Also:
Constant Field Values

SOL_TCP

public static final int SOL_TCP
See Also:
Constant Field Values

SOL_UDP

public static final int SOL_UDP
See Also:
Constant Field Values

SO_BROADCAST

public static final int SO_BROADCAST
See Also:
Constant Field Values

SO_DEBUG

public static final int SO_DEBUG
See Also:
Constant Field Values

SO_DONTROUTE

public static final int SO_DONTROUTE
See Also:
Constant Field Values

SO_ERROR

public static final int SO_ERROR
See Also:
Constant Field Values

SO_KEEPALIVE

public static final int SO_KEEPALIVE
See Also:
Constant Field Values

SO_LINGER

public static final int SO_LINGER
See Also:
Constant Field Values

SO_OOBINLINE

public static final int SO_OOBINLINE
See Also:
Constant Field Values

SO_RCVBUF

public static final int SO_RCVBUF
See Also:
Constant Field Values

SO_RCVLOWAT

public static final int SO_RCVLOWAT
See Also:
Constant Field Values

SO_RCVTIMEO

public static final int SO_RCVTIMEO
See Also:
Constant Field Values

SO_REUSEADDR

public static final int SO_REUSEADDR
See Also:
Constant Field Values

SO_SNDBUF

public static final int SO_SNDBUF
See Also:
Constant Field Values

SO_SNDLOWAT

public static final int SO_SNDLOWAT
See Also:
Constant Field Values

SO_SNDTIMEO

public static final int SO_SNDTIMEO
See Also:
Constant Field Values

SO_TIMESTAMP

public static final int SO_TIMESTAMP
See Also:
Constant Field Values

SO_TYPE

public static final int SO_TYPE
See Also:
Constant Field Values

SOCK_STREAM

public static final int SOCK_STREAM
See Also:
Constant Field Values

SOCK_DGRAM

public static final int SOCK_DGRAM
See Also:
Constant Field Values

SOCK_RAW

public static final int SOCK_RAW
See Also:
Constant Field Values

SOCK_RDM

public static final int SOCK_RDM
See Also:
Constant Field Values

SOCK_SEQPACKET

public static final int SOCK_SEQPACKET
See Also:
Constant Field Values

AF_UNSPEC

public static final int AF_UNSPEC
See Also:
Constant Field Values

PF_UNSPEC

public static final int PF_UNSPEC
See Also:
Constant Field Values

AF_UNIX

public static final int AF_UNIX
See Also:
Constant Field Values

PF_UNIX

public static final int PF_UNIX
See Also:
Constant Field Values

AF_INET

public static final int AF_INET
See Also:
Constant Field Values

PF_INET

public static final int PF_INET
See Also:
Constant Field Values

AF_IPX

public static final int AF_IPX
See Also:
Constant Field Values

PF_IPX

public static final int PF_IPX
See Also:
Constant Field Values

AF_INET6

public static final int AF_INET6
See Also:
Constant Field Values

IPPROTO_IP

public static final int IPPROTO_IP
See Also:
Constant Field Values

IPPROTO_ICMP

public static final int IPPROTO_ICMP
See Also:
Constant Field Values

IPPROTO_TCP

public static final int IPPROTO_TCP
See Also:
Constant Field Values

IPPROTO_UDP

public static final int IPPROTO_UDP
See Also:
Constant Field Values

MSG_OOB

public static final int MSG_OOB
See Also:
Constant Field Values

MSG_PEEK

public static final int MSG_PEEK
See Also:
Constant Field Values

MSG_DONTROUTE

public static final int MSG_DONTROUTE
See Also:
Constant Field Values
Constructor Detail

RubySocket

public RubySocket(Ruby runtime,
                  RubyClass type)
Method Detail

getSoTypeDefault

protected int getSoTypeDefault()
Overrides:
getSoTypeDefault in class RubyBasicSocket

for_fd

@Deprecated
public static IRubyObject for_fd(IRubyObject socketClass,
                                            IRubyObject fd)
Deprecated. 


for_fd

public static IRubyObject for_fd(ThreadContext context,
                                 IRubyObject socketClass,
                                 IRubyObject fd)

initialize

public IRubyObject initialize(ThreadContext context,
                              IRubyObject domain,
                              IRubyObject type,
                              IRubyObject protocol)

gethostname

@Deprecated
public static IRubyObject gethostname(IRubyObject recv)
Deprecated. 


gethostname

public static IRubyObject gethostname(ThreadContext context,
                                      IRubyObject recv)

gethostbyaddr

@Deprecated
public static IRubyObject gethostbyaddr(IRubyObject recv,
                                                   IRubyObject[] args)
Deprecated. 


gethostbyaddr

public static IRubyObject gethostbyaddr(ThreadContext context,
                                        IRubyObject recv,
                                        IRubyObject[] args)

getservbyname

@Deprecated
public static IRubyObject getservbyname(IRubyObject recv,
                                                   IRubyObject[] args)
Deprecated. 


getservbyname

public static IRubyObject getservbyname(ThreadContext context,
                                        IRubyObject recv,
                                        IRubyObject[] args)

pack_sockaddr_un

@Deprecated
public static IRubyObject pack_sockaddr_un(IRubyObject recv,
                                                      IRubyObject filename)
Deprecated. 


pack_sockaddr_un

public static IRubyObject pack_sockaddr_un(ThreadContext context,
                                           IRubyObject recv,
                                           IRubyObject filename)

pack_sockaddr_in

@Deprecated
public static IRubyObject pack_sockaddr_in(IRubyObject recv,
                                                      IRubyObject port,
                                                      IRubyObject host)
Deprecated. 


pack_sockaddr_in

public static IRubyObject pack_sockaddr_in(ThreadContext context,
                                           IRubyObject recv,
                                           IRubyObject port,
                                           IRubyObject host)

unpack_sockaddr_in

@Deprecated
public static IRubyObject unpack_sockaddr_in(IRubyObject recv,
                                                        IRubyObject addr)
Deprecated. 


unpack_sockaddr_in

public static IRubyObject unpack_sockaddr_in(ThreadContext context,
                                             IRubyObject recv,
                                             IRubyObject addr)

gethostbyname

@Deprecated
public static IRubyObject gethostbyname(IRubyObject recv,
                                                   IRubyObject hostname)
Deprecated. 


gethostbyname

public static IRubyObject gethostbyname(ThreadContext context,
                                        IRubyObject recv,
                                        IRubyObject hostname)

getaddrinfo

@Deprecated
public static IRubyObject getaddrinfo(IRubyObject recv,
                                                 IRubyObject[] args)
Deprecated. 


getaddrinfo

public static IRubyObject getaddrinfo(ThreadContext context,
                                      IRubyObject recv,
                                      IRubyObject[] args)

getnameinfo

@Deprecated
public static IRubyObject getnameinfo(IRubyObject recv,
                                                 IRubyObject[] args)
Deprecated. 


getnameinfo

public static IRubyObject getnameinfo(ThreadContext context,
                                      IRubyObject recv,
                                      IRubyObject[] args)


Copyright © 2002-2007 JRuby Team. All Rights Reserved.