org.jruby.ext.socket
Class RubyTCPServer

java.lang.Object
  extended byorg.jruby.RubyObject
      extended byorg.jruby.RubyIO
          extended byorg.jruby.ext.socket.RubyBasicSocket
              extended byorg.jruby.ext.socket.RubyIPSocket
                  extended byorg.jruby.ext.socket.RubyTCPSocket
                      extended byorg.jruby.ext.socket.RubyTCPServer
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class RubyTCPServer
extends RubyTCPSocket

Author:
Ola Bini

Nested Class Summary
 
Nested classes inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.ext.socket.RubyBasicSocket
socketChannel
 
Fields inherited from class org.jruby.RubyIO
fileno, handler, isOpen, lineNumber, modes, STDERR, STDIN, STDOUT
 
Fields inherited from class org.jruby.RubyObject
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyTCPServer(Ruby runtime, RubyClass type)
           
 
Method Summary
 IRubyObject accept()
           
 IRubyObject close()
          Closes all open resources for the IO.
 IRubyObject getpeername(IRubyObject[] args)
           
 IRubyObject initialize(IRubyObject hostname, IRubyObject port)
           
 IRubyObject listen(IRubyObject backlog)
           
static IRubyObject open(IRubyObject recv, IRubyObject[] args)
           
 IRubyObject peeraddr(IRubyObject[] args)
           
 
Methods inherited from class org.jruby.ext.socket.RubyTCPSocket
gethostbyname, open, setsockopt
 
Methods inherited from class org.jruby.ext.socket.RubyIPSocket
addr, getaddress, peeraddr, sockerr
 
Methods inherited from class org.jruby.ext.socket.RubyBasicSocket
do_not_reverse_lookup, getLocalSocket, getpeername, getRemoteSocket, getsockname, recv, set_do_not_reverse_lookup, setChannel, shutdown, write_send
 
Methods inherited from class org.jruby.RubyIO
addString, binmode, checkReadable, checkWriteable, closed, createIOClass, each_byte, each_line, eof, fcntl, fdOpen, fileno, flush, foreach, fsync, getBlocking, getc, getChannel, getInStream, getIOHandlerByFileno, getNewFileno, getOutStream, gets, hasPendingBuffered, initialize_copy, initialize, internalGets, io_wait, isOpen, lineno_set, lineno, pid, pipe, popen, pos_set, pos, print, printf, putc, puts, read, read, readchar, readline, readlines, readlines, readpartial, ready, registerIOHandler, reopen, rewind, seek, select_static, select, sync_set, sync, sysread, syswrite, to_io, toString, tty, ungetc, unregisterIOHandler, write
 
Methods inherited from class org.jruby.RubyObject
addFinalizer, anyToString, asString, asSymbol, attachToObjectSpace, callInit, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodMissingIfNecessary, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, doClone, dup, eql, eqlInternal, equal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getSingletonClassClone, getType, hash, hashCode, id_deprecated, id, infectBy, inherited, initCopy, inspect, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isImmediate, isKindOf, isNil, isSingleton, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, nil_p, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, taint, tainted, testFrozen, to_s, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RubyTCPServer

public RubyTCPServer(Ruby runtime,
                     RubyClass type)
Method Detail

initialize

public IRubyObject initialize(IRubyObject hostname,
                              IRubyObject port)
Overrides:
initialize in class RubyTCPSocket

accept

public IRubyObject accept()

close

public IRubyObject close()
Description copied from class: RubyIO

Closes all open resources for the IO. It also removes it from our magical all open file descriptor pool.

Overrides:
close in class RubyIO
Returns:
The IO.

listen

public IRubyObject listen(IRubyObject backlog)

peeraddr

public IRubyObject peeraddr(IRubyObject[] args)

getpeername

public IRubyObject getpeername(IRubyObject[] args)

open

public static IRubyObject open(IRubyObject recv,
                               IRubyObject[] args)


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