Logo Search packages:      
Sourcecode: jruby1.1 version File versions

org::jruby::ext::socket::RubySocket Class Reference

Inheritance diagram for org::jruby::ext::socket::RubySocket:

org::jruby::ext::socket::RubyBasicSocket org::jruby::RubyIO org::jruby::RubyObject org::jruby::runtime::builtin::IRubyObject org::jruby::runtime::builtin::InstanceVariables org::jruby::runtime::builtin::InternalVariables

List of all members.


Detailed Description

Author:
Ola Bini

Definition at line 70 of file RubySocket.java.


Public Member Functions

synchronized void addBlockingThread (RubyThread thread)
void addFinalizer (IRubyObject finalizer)
IRubyObject anyToString ()
IRubyObject as (Class javaClass)
String asJavaString ()
RubyString asString ()
void attachToObjectSpace ()
IRubyObject binmode ()
final void callInit (IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, int methodIndex, String name)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args, Block block)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject[] args)
final IRubyObject callMethod (ThreadContext context, String name, IRubyObject arg)
final IRubyObject callMethod (ThreadContext context, String name)
IRubyObject callSuper (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject checkArrayType ()
IRubyObject checkStringType ()
IRubyObject close ()
IRubyObject close_read (ThreadContext context)
IRubyObject close_write (ThreadContext context)
RubyBoolean closed_p (ThreadContext context)
RubyArray convertToArray ()
RubyFloat convertToFloat ()
RubyHash convertToHash ()
RubyInteger convertToInteger (int convertMethodIndex, String convertMethod)
RubyInteger convertToInteger ()
RubyString convertToString ()
final IRubyObject convertToType (RubyClass target, int convertMethodIndex)
IRubyObject ctl (Ruby runtime, IRubyObject cmd, IRubyObject arg)
synchronized Object dataGetStruct ()
synchronized void dataWrapStruct (Object obj)
IRubyObject display (ThreadContext context, IRubyObject[] args)
IRubyObject dup ()
IRubyObject each_byte (ThreadContext context, Block block)
RubyIO each_line (ThreadContext context, IRubyObject[] args, Block block)
RubyBoolean eof_p (ThreadContext context)
boolean eql (IRubyObject other)
IRubyObject eql_p (IRubyObject obj)
IRubyObject equal_p (ThreadContext context, IRubyObject obj)
boolean equals (Object other)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, RubyString src, String file, int line)
IRubyObject evalUnder (final ThreadContext context, RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line)
IRubyObject extend (IRubyObject[] args)
IRubyObject fastGetInstanceVariable (String internedName)
IRubyObject fastGetInternalVariable (String internedName)
boolean fastHasInstanceVariable (String internedName)
boolean fastHasInternalVariable (String internedName)
IRubyObject fastSetInstanceVariable (String internedName, IRubyObject value)
void fastSetInternalVariable (String internedName, IRubyObject value)
IRubyObject fcntl (ThreadContext context, IRubyObject cmd, IRubyObject arg)
RubyFixnum fileno (ThreadContext context)
RubyIO flush ()
IRubyObject freeze (ThreadContext context)
RubyBoolean frozen_p (ThreadContext context)
RubyFixnum fsync (ThreadContext context)
boolean getBlocking ()
IRubyObject getc ()
Channel getChannel ()
ChannelDescriptor getDescriptorByFileno (int aFileno)
final boolean getFlag (int flag)
Stream getHandler ()
IRubyObject getInstanceVariable (String name)
List< Variable< IRubyObject > > getInstanceVariableList ()
List< String > getInstanceVariableNameList ()
InstanceVariables getInstanceVariables ()
InputStream getInStream ()
IRubyObject getInternalVariable (String name)
List< Variable< IRubyObject > > getInternalVariableList ()
InternalVariables getInternalVariables ()
Class getJavaClass ()
IRubyObject getline (Ruby runtime, ByteList separator)
IRubyObject getlineFast (Ruby runtime, int delim) throws IOException, BadDescriptorException
final RubyClass getMetaClass ()
int getNativeTypeIndex ()
OpenFile getOpenFile ()
OutputStream getOutStream ()
IRubyObject getpeername ()
final Ruby getRuntime ()
IRubyObject gets (ThreadContext context, IRubyObject[] args)
RubyClass getSingletonClass ()
IRubyObject getsockname ()
IRubyObject getsockopt (IRubyObject lev, IRubyObject optname)
RubyClass getType ()
int getVariableCount ()
List< Variable< IRubyObject > > getVariableList ()
Map getVariableMap ()
List< String > getVariableNameList ()
RubyFixnum hash ()
int hashCode ()
boolean hasInstanceVariable (String name)
boolean hasInternalVariable (String name)
boolean hasVariables ()
synchronized IRubyObject id ()
synchronized IRubyObject id_deprecated ()
IRubyObject infectBy (IRubyObject obj)
IRubyObject initialize ()
IRubyObject initialize (IRubyObject[] args, Block unusedBlock)
IRubyObject initialize (IRubyObject domain, IRubyObject type, IRubyObject protocol)
IRubyObject initialize_copy (IRubyObject original)
IRubyObject inspect ()
IRubyObject instance_eval (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject instance_eval (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject instance_eval (ThreadContext context, Block block)
IRubyObject instance_exec (ThreadContext context, IRubyObject[] args, Block block)
RubyBoolean instance_of_p (ThreadContext context, IRubyObject type)
IRubyObject instance_variable_defined_p (ThreadContext context, IRubyObject name)
IRubyObject instance_variable_get (ThreadContext context, IRubyObject name)
IRubyObject instance_variable_set (IRubyObject name, IRubyObject value)
RubyArray instance_variables (ThreadContext context)
IRubyObject ioctl (ThreadContext context, IRubyObject[] args)
boolean isClass ()
final boolean isFalse ()
boolean isFrozen ()
boolean isImmediate ()
boolean isModule ()
final boolean isNil ()
boolean isTaint ()
final boolean isTrue ()
RubyBoolean kind_of_p (ThreadContext context, IRubyObject type)
RubyFixnum lineno (ThreadContext context)
RubyFixnum lineno_set (ThreadContext context, IRubyObject newLineNumber)
RubyClass makeMetaClass (RubyClass superClass)
IRubyObject method (IRubyObject symbol)
IRubyObject methods (ThreadContext context, IRubyObject[] args)
IRubyObject nil_p (ThreadContext context)
IRubyObject op_append (ThreadContext context, IRubyObject anObject)
IRubyObject op_eqq (ThreadContext context, IRubyObject other)
IRubyObject op_equal (ThreadContext context, IRubyObject obj)
IRubyObject op_match (ThreadContext context, IRubyObject arg)
IRubyObject pid (ThreadContext context)
RubyFixnum pos (ThreadContext context)
RubyFixnum pos_set (ThreadContext context, IRubyObject newPosition)
IRubyObject print (ThreadContext context, IRubyObject[] args)
IRubyObject printf (ThreadContext context, IRubyObject[] args)
IRubyObject private_methods (ThreadContext context, IRubyObject[] args)
IRubyObject protected_methods (ThreadContext context, IRubyObject[] args)
IRubyObject public_methods (ThreadContext context, IRubyObject[] args)
IRubyObject putc (ThreadContext context, IRubyObject object)
IRubyObject puts (ThreadContext context, IRubyObject[] args)
IRubyObject rbClone ()
IRubyObject read (ThreadContext context, IRubyObject arg0, IRubyObject arg1)
IRubyObject read (ThreadContext context, IRubyObject arg0)
IRubyObject read (ThreadContext context)
IRubyObject read (IRubyObject[] args)
IRubyObject read_nonblock (ThreadContext context, IRubyObject[] args)
IRubyObject readchar ()
IRubyObject readline (ThreadContext context, IRubyObject[] args)
RubyArray readlines (ThreadContext context, IRubyObject[] args)
IRubyObject readpartial (ThreadContext context, IRubyObject[] args)
IRubyObject recv (IRubyObject[] args)
void registerDescriptor (ChannelDescriptor descriptor)
IRubyObject remove_instance_variable (ThreadContext context, IRubyObject name, Block block)
synchronized void removeBlockingThread (RubyThread thread)
void removeFinalizers ()
IRubyObject removeInstanceVariable (String name)
IRubyObject removeInternalVariable (String name)
IRubyObject reopen (ThreadContext context, IRubyObject[] args) throws InvalidValueException
RubyBoolean respond_to_p (IRubyObject mname, IRubyObject includePrivate)
RubyBoolean respond_to_p (IRubyObject mname)
final boolean respondsTo (String name)
RubyFixnum rewind (ThreadContext context)
 RubySocket (Ruby runtime, RubyClass type)
RubyFixnum seek (ThreadContext context, IRubyObject arg0, IRubyObject arg1)
RubyFixnum seek (ThreadContext context, IRubyObject arg0)
RubyFixnum seek (ThreadContext context, IRubyObject[] args)
IRubyObject send (ThreadContext context, IRubyObject[] args, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject send (ThreadContext context, IRubyObject arg0, Block block)
IRubyObject send (ThreadContext context, Block block)
final void setFlag (int flag, boolean set)
void setFrozen (boolean frozen)
IRubyObject setInstanceVariable (String name, IRubyObject value)
void setInternalVariable (String name, IRubyObject value)
void setMetaClass (RubyClass metaClass)
IRubyObject setsockopt (IRubyObject lev, IRubyObject optname, IRubyObject val)
void setTaint (boolean taint)
IRubyObject shutdown (ThreadContext context, IRubyObject[] args)
RubyArray singleton_methods (ThreadContext context, IRubyObject[] args)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject arg, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, Block block)
IRubyObject specificEval (ThreadContext context, RubyModule mod, IRubyObject[] args, Block block)
IRubyObject stat (ThreadContext context)
RubyBoolean sync (ThreadContext context)
IRubyObject sync_set (IRubyObject newSync)
void syncVariables (List< Variable< IRubyObject >> variables)
IRubyObject sysread (ThreadContext context, IRubyObject[] args)
RubyFixnum sysseek (ThreadContext context, IRubyObject[] args)
IRubyObject syswrite (ThreadContext context, IRubyObject obj)
IRubyObject taint (ThreadContext context)
RubyBoolean tainted_p (ThreadContext context)
RubyArray to_a ()
RubyIO to_io ()
IRubyObject to_java ()
IRubyObject to_s ()
String toString ()
RubyBoolean tty_p (ThreadContext context)
RubyClass type ()
RubyClass type_deprecated ()
IRubyObject ungetc (IRubyObject number)
void unregisterDescriptor (int aFileno)
IRubyObject untaint (ThreadContext context)
IRubyObject write (ThreadContext context, IRubyObject obj)
IRubyObject write_nonblock (ThreadContext context, IRubyObject obj)
IRubyObject write_send (ThreadContext context, IRubyObject[] args)
boolean writeDataBuffered ()

Static Public Member Functions

static IRubyObject copy_stream (ThreadContext context, IRubyObject recv, IRubyObject stream1, IRubyObject stream2) throws IOException
static RubyClass createIOClass (Ruby runtime)
static RubyClass createObjectClass (Ruby runtime, RubyClass objectClass)
static IRubyObject do_not_reverse_lookup (IRubyObject recv)
static IRubyObject for_fd (IRubyObject socketClass, IRubyObject fd)
static IRubyObject foreach (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static IRubyObject getaddrinfo (IRubyObject recv, IRubyObject[] args)
static IRubyObject gethostbyaddr (IRubyObject recv, IRubyObject[] args)
static IRubyObject gethostbyname (IRubyObject recv, IRubyObject hostname)
static IRubyObject gethostname (IRubyObject recv)
static ModeFlags getIOModes (Ruby runtime, String modesString) throws InvalidValueException
static int getIOModesIntFromString (Ruby runtime, String modesString)
static IRubyObject getnameinfo (IRubyObject recv, IRubyObject[] args)
static int getNewFileno ()
static IRubyObject getservbyname (IRubyObject recv, IRubyObject[] args)
static IRubyObject newInstance (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static RubyIO newIO (Ruby runtime, Channel channel)
static IRubyObject open (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static IRubyObject pack_sockaddr_in (IRubyObject recv, IRubyObject port, IRubyObject host)
static IRubyObject pack_sockaddr_un (IRubyObject recv, IRubyObject filename)
static IRubyObject pipe (ThreadContext context, IRubyObject recv) throws Exception
static IRubyObject popen (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static void puts (Object obj)
static IRubyObject read (ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
static IRubyObject read (ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1, Block block)
static IRubyObject read (ThreadContext context, IRubyObject recv, IRubyObject arg0, Block block)
static IRubyObject read (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static RubyArray readlines (ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
static IRubyObject select (ThreadContext context, IRubyObject recv, IRubyObject[] args)
static IRubyObject select_static (ThreadContext context, Ruby runtime, IRubyObject[] args)
static IRubyObject set_do_not_reverse_lookup (IRubyObject recv, IRubyObject flag)
static IRubyObject unpack_sockaddr_in (IRubyObject recv, IRubyObject addr)

Static Public Attributes

static final int AF_INET = 2
static final int AF_INET6 = 30
static final int AF_UNIX = 1
static final int AF_UNSPEC = 0
static final int ALL_F = -1
static final int FALSE_F = 1 << 0
static final int FL_USHIFT = 4
static final int FROZEN_F = 1 << 2
static final int IPPROTO_ICMP = 1
static final int IPPROTO_IP = 0
static final int IPPROTO_TCP = 6
static final int IPPROTO_UDP = 17
static final IRubyObject NEVER = new RubyObject()
static final int NI_DGRAM = 16
static final int NI_MAXHOST = 1025
static final int NI_MAXSERV = 32
static final int NI_NAMEREQD = 4
static final int NI_NOFQDN = 1
static final int NI_NUMERICHOST = 2
static final int NI_NUMERICSERV = 8
static final int NIL_F = 1 << 1
static final IRubyObject[] NULL_ARRAY = new IRubyObject[0]
static final ObjectAllocator OBJECT_ALLOCATOR
static final int PF_INET = 2
static final int PF_UNIX = 1
static final int PF_UNSPEC = 0
static final int SO_BROADCAST = 32
static final int SO_DEBUG = 1
static final int SO_DONTROUTE = 16
static final int SO_ERROR = 4103
static final int SO_KEEPALIVE = 8
static final int SO_LINGER = 128
static final int SO_OOBINLINE = 256
static final int SO_RCVBUF = 4098
static final int SO_RCVLOWAT = 4100
static final int SO_RCVTIMEO = 4102
static final int SO_REUSEADDR = 4
static final int SO_SNDBUF = 4097
static final int SO_SNDLOWAT = 4099
static final int SO_SNDTIMEO = 4101
static final int SO_TIMESTAMP = 1024
static final int SO_TYPE = 4104
static final int SOCK_DGRAM = 2
static final int SOCK_RAW = 3
static final int SOCK_STREAM = 1
static final int SOL_IP = 0
static final int SOL_SOCKET = 65535
static final int SOL_TCP = 6
static final int SOL_UDP = 17
static final int TAINTED_F = 1 << 3
static final IRubyObject UNDEF = new RubyObject()
static final int USER0_F = (1<<(FL_USHIFT+0))
static final int USER1_F = (1<<(FL_USHIFT+1))
static final int USER2_F = (1<<(FL_USHIFT+2))
static final int USER3_F = (1<<(FL_USHIFT+3))
static final int USER4_F = (1<<(FL_USHIFT+4))
static final int USER5_F = (1<<(FL_USHIFT+5))
static final int USER6_F = (1<<(FL_USHIFT+6))
static final int USER7_F = (1<<(FL_USHIFT+7))

Protected Member Functions

boolean asBoolean (IRubyObject val)
void checkClosed ()
void checkFrozen ()
void checkInitialized ()
IRubyObject close2 (Ruby runtime)
void copySpecialInstanceVariables (IRubyObject clone)
void ensureInstanceVariablesSettable ()
Stream fdopen (ChannelDescriptor existingDescriptor, ModeFlags modes) throws InvalidValueException
int fwrite (ByteList buffer)
InetSocketAddress getLocalSocket ()
OpenFile getOpenFileChecked ()
InetSocketAddress getRemoteSocket ()
RubyClass getSingletonClassClone ()
int getSoTypeDefault ()
void initSocket (ChannelDescriptor descriptor)
synchronized void interruptBlockingThreads ()
IRubyObject readAll (IRubyObject buffer) throws BadDescriptorException, EOFException, IOException
boolean swallow (int term) throws IOException, BadDescriptorException
final void testFrozen (String message)
String validateInstanceVariable (String name)
boolean variableTableContains (String name)
boolean variableTableFastContains (String internedName)
IRubyObject variableTableFastFetch (String internedName)
IRubyObject variableTableFastStore (String internedName, IRubyObject value)
IRubyObject variableTableFetch (String name)
Map variableTableGetMap (Map map)
Map variableTableGetMap ()
int variableTableGetSize ()
VariableTableEntry[] variableTableGetTable ()
synchronized IRubyObject variableTableReadLocked (VariableTableEntry entry)
final VariableTableEntry[] variableTableRehash ()
IRubyObject variableTableRemove (String name)
IRubyObject variableTableStore (String name, IRubyObject value)
void variableTableSync (List< Variable< IRubyObject >> vars)
boolean waitReadable (ChannelDescriptor descriptor) throws IOException
boolean waitWritable (ChannelDescriptor descriptor) throws IOException
void write (ThreadContext context, ByteList byteList)

Static Protected Member Functions

static boolean eqlInternal (final ThreadContext context, final IRubyObject that, final IRubyObject other)
static boolean equalInternal (final ThreadContext context, final IRubyObject that, final IRubyObject other)
static final boolean isRubyVariable (String name)

Protected Attributes

List< RubyThreadblockingThreads
transient Object dataStruct
int flags
transient RubyClass metaClass
OpenFile openFile
transient volatile
VariableTableEntry[] 
variableTable
transient int variableTableSize
transient int variableTableThreshold

Static Protected Attributes

static final String ERR_INSECURE_SET_INST_VAR = "Insecure: can't modify instance variable"
static AtomicInteger filenoIndex = new AtomicInteger(2)
static final int VARIABLE_TABLE_DEFAULT_CAPACITY = 8
static final VariableTableEntry[] VARIABLE_TABLE_EMPTY_TABLE = new VariableTableEntry[0]
static final float VARIABLE_TABLE_LOAD_FACTOR = 0.75f
static final int VARIABLE_TABLE_MAXIMUM_CAPACITY = 1 << 30

Static Package Functions

static void createBasicSocket (Ruby runtime)
static void createSocket (Ruby runtime)
static RubyString inspect (ThreadContext context, IRubyObject object)

Static Private Member Functions

static InetAddress intoAddress (IRubyObject recv, String s)
static String intoString (IRubyObject recv, InetAddress as)
static RuntimeException sockerr (IRubyObject recv, String msg)

Private Attributes

int soDomain
int soProtocol
int soType

Static Private Attributes

static final int HOST_GROUP = 3
static final int PORT_GROUP = 5
static ObjectAllocator SOCKET_ALLOCATOR
static final Pattern STRING_ADDRESS_PATTERN

Classes

class  Constants
class  Service
class  SocketError

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index