Top Description Inners Fields Constructors Methods
org.jruby.ext.socket

public Class RubyBasicSocket

extends RubyIO
Class Inheritance
Known Direct Subclasses
org.jruby.ext.socket.RubyIPSocket, org.jruby.ext.socket.RubySocket, org.jruby.ext.socket.RubyUNIXSocket
Annotations
@JRubyClass
name:BasicSocket
parent:IO
Imports
jnr.constants.platform.Fcntl, .IPProto, .ProtocolFamily, .SocketLevel, .SocketOption, jnr.ffi.LibraryLoader, jnr.ffi.annotations.In, .Out, jnr.ffi.byref.IntByReference, jnr.posix.Timeval, .POSIX, jnr.unixsocket.UnixSocketAddress, org.jruby.Ruby, .RubyBasicObject, .RubyBoolean, .RubyClass, .RubyFixnum, .RubyHash, .RubyIO, .RubyNumeric, .RubyString, .RubySymbol, org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.api.Access, .Convert, org.jruby.ast.util.ArgsUtil, org.jruby.ext.fcntl.FcntlLibrary, org.jruby.platform.Platform, org.jruby.runtime.Arity, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, .Pack, .TypeConverter, org.jruby.util.io.BadDescriptorException, .ChannelFD, .OpenFile, .Sockaddr, java.io.IOException, java.net.Inet6Address, .InetSocketAddress, .SocketAddress, java.nio.ByteBuffer, .ByteOrder, java.nio.channels.Channel, .DatagramChannel, .SelectableChannel

Implementation of the BasicSocket class from Ruby.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
protected static class

Field Summary

Modifier and TypeField and Description
private boolean
private static final ByteList
pack-priv static final String[]
protected MulticastStateManager
pack-priv static final RubyBasicSocket.LibC
Inherited from org.jruby.RubyIO:
CLOSED_STREAM_MSGFD_CLOEXECopenFilePARAGRAPH_SEPARATORpopenSpecial

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected IRubyObject
addrFor(ThreadContext context, InetSocketAddress addr, boolean reverse)

protected boolean
private static int
protected static String
bindContextMessage(IRubyObject host, int port)
Deprecated since 10.0.

protected static String
bindContextMessage(ThreadContext context, IRubyObject host, int port)

public IRubyObject
public IRubyObject
private IRubyObject
closeHalf(ThreadContext context, int closeHalf)

pack-priv static RubyClass
public IRubyObject
public static IRubyObject
public static IRubyObject
public boolean
protected ByteList
doRead(ThreadContext context, final ByteBuffer buffer)

protected final ByteList
doReadNonblock(ThreadContext context, final ByteBuffer buffer, boolean exception)

private IRubyObject
pack-priv static boolean
public static IRubyObject
for_fd(ThreadContext context, IRubyObject _klass, IRubyObject _fileno)

protected InetSocketAddress
getInetRemoteSocket()
Deprecated since 10.0.

protected InetSocketAddress
protected InetSocketAddress
private Channel
public IRubyObject
public IRubyObject
public IRubyObject
getpeername()
Deprecated

protected SocketAddress
getRemoteSocket()
Deprecated since 10.0.

protected SocketAddress
protected SocketAddress
public IRubyObject
public IRubyObject
getsockname()
Deprecated

protected IRubyObject
public IRubyObject
public IRubyObject
getsockopt(IRubyObject lev, IRubyObject optname)
Deprecated

protected UnixSocketAddress
getUnixRemoteSocket()
Deprecated since 10.0.

protected UnixSocketAddress
protected UnixSocketAddress
private IRubyObject
handleReturnBytes(ThreadContext context, ByteList bytes, IRubyObject str, String exMessage, boolean exception)

protected void
private void
public IRubyObject
protected static ChannelFD
newChannelFD(Ruby runtime, Channel channel)

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
private IRubyObject
readNonblockCommon(ThreadContext context, DatagramChannel channel, IRubyObject length, IRubyObject str, boolean exception)

public IRubyObject
recv(ThreadContext context, IRubyObject length)

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

private IRubyObject
recv(ThreadContext context, IRubyObject length, RubyString str, IRubyObject flags)

public IRubyObject
recv(IRubyObject[] args)
Deprecated

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
send(ThreadContext context, IRubyObject _mesg, IRubyObject _flags)

public IRubyObject
send(ThreadContext context, IRubyObject _mesg, IRubyObject _flags, IRubyObject _to)

public IRubyObject
public IRubyObject
public IRubyObject
public static IRubyObject
public static IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
setsockopt(IRubyObject lev, IRubyObject optname, IRubyObject val)
Deprecated

public IRubyObject
private static IRubyObject
shutdownInternal(ThreadContext context, OpenFile fptr, int how)

pack-priv static RuntimeException
sockerr(final Ruby runtime, final String msg, final Exception cause)

private static int
private boolean
validTcpSockOpt(int intOpt)

Inherited from org.jruby.RubyIO:
addBlockingThreadadviseautocloseautoclose_setbinmodebinmodebinreadbinwritebytescharscheckExecEnvcheckExecOptionscheckLengthcheckPopenOptionscheckSpawnOptionscloexecOpenclosecloseclose_on_exec_pclose_on_exec_setclosed_pcodepointsconvertToIOcopy_streamcopy_streamcopy_streamcreateIOClassdoReaddoReadNonblockdoReadNonblockdoReadNonblockdoReadNonblockdoWriteNonblockeacheacheacheacheacheach_byteeach_byteInternaleach_chareach_charInternaleach_codepointeach_lineeach_lineeach_lineeach_lineeach_lineensureYieldCloseensureYieldClosePipeseof_pexternal_encodingfailIfDirectoryfcntlfcntlfilenoflushflushflushRawfor_fdforeachfsyncgetBlockinggetBOMgetbytegetBytegetcgetcgetChannelgetEcflagsgetEcoptsgetEncgetEnc2getInputEncodinggetInStreamgetIOModesgetIOModesIntFromStringgetlinegetlinegetlinegetlinegetlinegetlinegetNativeClassIndexgetOpenFilegetOpenFileCheckedgetOpenFileInitializedgetOutStreamgetPathgetReadEncodinggetsgetsgetsgetsgetSyncGetWriteIOinitializeinitializeinitializeinitialize_copyinspectinternal_encodingioCloseioctlioOpenioOpenioStaticWriteisAutocloseisClosedlinenolineno_setlinesMakeOpenFilenewInstancenewIOnewIOOptionsnewIOOptionsnewIOOptionsnewIOOptionsnewIOOptionsnewModeFlagsnewModeFlagsnewModeFlagsobliterateProcessop_appendop_binmodeopenparseIOOptionspathpidpipepipepipepipepipepipepopenpopen3popen4popenSpecialpospos_setpreadpreadprepStdioprepStdioprintprintprintprintprintprintprint0print1print2print3printfprintfputcputcputsputsputsputsputsputsputs0puts1puts2puts3pwriterbIoClosereadreadreadreadreadreadreadreadreadbytereadcharreadcharreadlinereadlinereadlinereadlinereadlinereadlinesreadlinesreadlinesreadlinesreadlinesreadlinesreadpartialreadpartialreadpartialremoveBlockingThreadreopenreopenIOrewindseekseekseekselectselect_staticset_encodingset_encodingset_encodingset_encoding_by_bomsetAscii8bitBinmodesetAutoclosesetBlockingsetBOMsetEcflagssetEcoptssetEncsetEnc2setEncodingsetPathsetSyncstatsyncsync_setsync_setsysopensysopensysopensysreadsysreadsysreadsysseeksyswriteto_iotoJavatoStringtryConverttty_pungetbyteungetcupdateIOOptionsFromOptionswaitwaitwait_readablewait_readablewait_writablewait_writablewritewritewritewritewritewritewritewritewritewritewritewritewritewritewritewritewrite2write3write_nonblockwrite_nonblockwrite_nonblockwriteStaticwritevwritevwritevwritevwritev