Top Fields Constructors Methods
org.jruby.ext.socket

public Class RubyUDPSocket

extends RubyIPSocket
Class Inheritance
Annotations
@JRubyClass
name:UDPSocket
parent:IPSocket
Imports
jnr.constants.platform.AddressFamily, jnr.netdb.Service, org.jruby.Ruby, .RubyBasicObject, .RubyClass, .RubyFixnum, .RubyHash, .RubyModule, .RubyNumeric, .RubyString, org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.api.Convert, org.jruby.ast.util.ArgsUtil, org.jruby.exceptions.RaiseException, org.jruby.runtime.Arity, .Block, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, org.jruby.util.io.OpenFile, .Sockaddr, java.io.IOException, java.net.BindException, .ConnectException, .DatagramPacket, .Inet4Address, .Inet6Address, .InetAddress, .InetSocketAddress, .MulticastSocket, .NoRouteToHostException, .PortUnreachableException, .ProtocolFamily, .SocketException, .StandardProtocolFamily, .UnknownHostException, java.nio.ByteBuffer, java.nio.channels.AlreadyBoundException, .DatagramChannel, .IllegalBlockingModeException, .NotYetConnectedException, .UnsupportedAddressTypeException

Field Summary

Modifier and TypeField and Description
private volatile Class<? extends InetAddress>
private volatile ProtocolFamily
public static final double

Constructor Summary

AccessConstructor and Description
public
RubyUDPSocket(Ruby runtime, RubyClass type)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
bind(ThreadContext context, IRubyObject host, IRubyObject _port)

public IRubyObject
bind(IRubyObject host, IRubyObject port)
Deprecated

public IRubyObject
public IRubyObject
connect(IRubyObject host, IRubyObject port)
Deprecated

pack-priv static void
createUDPSocket(ThreadContext context, RubyClass IPSocket, RubyClass Socket)

private static IRubyObject
doReceive(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length)

protected static IRubyObject
doReceive(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length, RubyBasicSocket.ReceiveTuple tuple)

private static IRubyObject
doReceiveMulticast(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length, RubyBasicSocket.ReceiveTuple tuple)

private static RubyBasicSocket.ReceiveTuple
doReceiveNonblockTuple(RubyBasicSocket socket, Ruby runtime, int length)

private static RubyBasicSocket.ReceiveTuple
doReceiveTuple(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length)

private DatagramChannel
private InetSocketAddress
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
inspect(ThreadContext context)

Overrides org.jruby.RubyIO.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Returns a string containing a human-readable representation of obj.

private String
public static IRubyObject
public static IRubyObject
open(IRubyObject recv, IRubyObject[] args, Block block)
Deprecated

public IRubyObject
recv(ThreadContext context, IRubyObject length)

Overrides org.jruby.ext.socket.RubyBasicSocket.recv.

Overrides BasicSocket#recv

public IRubyObject
recvfrom(ThreadContext context, IRubyObject length)

Overrides org.jruby.ext.socket.RubyIPSocket.recvfrom.

Overrides IPSocket#recvfrom

public static IRubyObject
public IRubyObject
recvfrom(ThreadContext context, IRubyObject _length, IRubyObject _flags)

Overrides org.jruby.ext.socket.RubyIPSocket.recvfrom.

Overrides IPSocket#recvfrom

public IRubyObject
recvfrom(IRubyObject[] args)
Deprecated

public IRubyObject
public static IRubyObject
private static IRubyObject
recvfrom_nonblock(RubyBasicSocket socket, ThreadContext context, IRubyObject length, IRubyObject flags, IRubyObject str, boolean exception)

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

public IRubyObject
send(IRubyObject[] args)
Deprecated

Inherited from org.jruby.ext.socket.RubyIPSocket:
addraddraddrcreateIPSocketdoReverseLookupgetaddressgetaddressgetpeereidgetpeernamegetSocknameCommonpeeraddrpeeraddrpeeraddrrecvfrom

Field Detail

explicitFamilyback to summary
private volatile Class<? extends InetAddress> explicitFamily
familyback to summary
private volatile ProtocolFamily family
RECV_BUFFER_COPY_SCALEback to summary
public static final double RECV_BUFFER_COPY_SCALE

Constructor Detail

RubyUDPSocketback to summary
public RubyUDPSocket(Ruby runtime, RubyClass type)

Method Detail

bindback to summary
public IRubyObject bind(ThreadContext context, IRubyObject host, IRubyObject _port)
Annotations
@JRubyMethod
bindback to summary
public IRubyObject bind(IRubyObject host, IRubyObject port)

Deprecated

Annotations
@Deprecated
connectback to summary
public IRubyObject connect(ThreadContext context, IRubyObject _host, IRubyObject port)
Annotations
@JRubyMethod
connectback to summary
public IRubyObject connect(IRubyObject host, IRubyObject port)

Deprecated

Annotations
@Deprecated
createUDPSocketback to summary
pack-priv static void createUDPSocket(ThreadContext context, RubyClass IPSocket, RubyClass Socket)
doReceiveback to summary
private static IRubyObject doReceive(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length) throws IOException
doReceiveback to summary
protected static IRubyObject doReceive(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length, RubyBasicSocket.ReceiveTuple tuple) throws IOException
doReceiveMulticastback to summary
private static IRubyObject doReceiveMulticast(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length, RubyBasicSocket.ReceiveTuple tuple) throws IOException
doReceiveNonblockTupleback to summary
private static RubyBasicSocket.ReceiveTuple doReceiveNonblockTuple(RubyBasicSocket socket, Ruby runtime, int length) throws IOException
doReceiveTupleback to summary
private static RubyBasicSocket.ReceiveTuple doReceiveTuple(RubyBasicSocket socket, final Ruby runtime, final boolean non_block, int length) throws IOException
getDatagramChannelback to summary
private DatagramChannel getDatagramChannel()
getInetSocketAddressback to summary
private InetSocketAddress getInetSocketAddress(ThreadContext context, IRubyObject host, int port) throws UnknownHostException
initializeback to summary
public IRubyObject initialize(ThreadContext context)

Overrides org.jruby.RubyBasicObject.initialize.

Annotations
@Override
@JRubyMethod
visibility:PRIVATE
initializeback to summary
public IRubyObject initialize(ThreadContext context, IRubyObject _family)
Annotations
@JRubyMethod
visibility:PRIVATE
initializeback to summary
public IRubyObject initialize(ThreadContext context, ProtocolFamily family)
inspectback to summary
public IRubyObject inspect(ThreadContext context)

Overrides org.jruby.RubyIO.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_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"

Annotations
@JRubyMethod
inspectExtraInfoback to summary
private String inspectExtraInfo(OpenFile openFile)
openback to summary
public static IRubyObject open(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

Hides org.jruby.RubyIO.open.

Annotations
@JRubyMethod
rest:true
meta:true
openback to summary
public static IRubyObject open(IRubyObject recv, IRubyObject[] args, Block block)

Deprecated

Annotations
@Deprecated
recvback to summary
public IRubyObject recv(ThreadContext context, IRubyObject length)

Overrides org.jruby.ext.socket.RubyBasicSocket.recv.

Overrides BasicSocket#recv

Annotations
@Override
recvfromback to summary
public IRubyObject recvfrom(ThreadContext context, IRubyObject length)

Overrides org.jruby.ext.socket.RubyIPSocket.recvfrom.

Overrides IPSocket#recvfrom

Annotations
@Override
recvfromback to summary
public static IRubyObject recvfrom(RubyBasicSocket socket, ThreadContext context, IRubyObject length)
recvfromback to summary
public IRubyObject recvfrom(ThreadContext context, IRubyObject _length, IRubyObject _flags)

Overrides org.jruby.ext.socket.RubyIPSocket.recvfrom.

Overrides IPSocket#recvfrom

Annotations
@Override
recvfromback to summary
public IRubyObject recvfrom(IRubyObject[] args)

Deprecated

Annotations
@Deprecated
recvfrom_nonblockback to summary
public IRubyObject recvfrom_nonblock(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
required:1
optional:3
checkArity:false
recvfrom_nonblockback to summary
public static IRubyObject recvfrom_nonblock(RubyBasicSocket socket, ThreadContext context, IRubyObject[] args)
recvfrom_nonblockback to summary
private static IRubyObject recvfrom_nonblock(RubyBasicSocket socket, ThreadContext context, IRubyObject length, IRubyObject flags, IRubyObject str, boolean exception)
sendback to summary
public IRubyObject send(ThreadContext context, IRubyObject _mesg, IRubyObject _flags)

Overrides org.jruby.ext.socket.RubyBasicSocket.send.

Annotations
@JRubyMethod
sendback to summary
public IRubyObject send(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
required:2
optional:2
checkArity:false
sendback to summary
public IRubyObject send(IRubyObject[] args)

Deprecated

Annotations
@Deprecated