public class org.jruby.ext.socket.RubyServerSocket extends org.jruby.ext.socket.RubySocket
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.socket.RubyServerSocket
super_class: org.jruby.ext.socket.RubySocket
{
private static org.jruby.runtime.ObjectAllocator SERVER_SOCKET_ALLOCATOR;
descriptor: Lorg/jruby/runtime/ObjectAllocator;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jruby.ext.socket.RubyServerSocket$1
dup
invokespecial org.jruby.ext.socket.RubyServerSocket$1.<init>:()V
putstatic org.jruby.ext.socket.RubyServerSocket.SERVER_SOCKET_ALLOCATOR:Lorg/jruby/runtime/ObjectAllocator;
1: return
LocalVariableTable:
Start End Slot Name Signature
static void createServerSocket(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
ldc "ServerSocket"
aload 0
ldc "Socket"
invokevirtual org.jruby.Ruby.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
getstatic org.jruby.ext.socket.RubyServerSocket.SERVER_SOCKET_ALLOCATOR:Lorg/jruby/runtime/ObjectAllocator;
invokevirtual org.jruby.Ruby.defineClass:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
astore 1
start local 1 1: aload 1
ldc Lorg/jruby/ext/socket/RubyServerSocket;
invokevirtual org.jruby.RubyClass.defineAnnotatedMethods:(Ljava/lang/Class;)V
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 runtime Lorg/jruby/Ruby;
1 3 1 rb_cSocket Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
public void <init>(org.jruby.Ruby, org.jruby.RubyClass);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial org.jruby.ext.socket.RubySocket.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 2 1 runtime Lorg/jruby/Ruby;
0 2 2 type Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
type
public org.jruby.runtime.builtin.IRubyObject listen(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getWarnings:()Lorg/jruby/common/RubyWarnings;
1: getstatic org.jruby.common.IRubyWarnings$ID.LISTEN_SERVER_SOCKET:Lorg/jruby/common/IRubyWarnings$ID;
2: ldc "pass backlog to #bind instead of #listen (http://wiki.jruby.org/ServerSocket)"
3: invokevirtual org.jruby.common.RubyWarnings.warnOnce:(Lorg/jruby/common/IRubyWarnings$ID;Ljava/lang/String;)V
4: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
iconst_0
invokevirtual org.jruby.Ruby.newFixnum:(I)Lorg/jruby/RubyFixnum;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 5 1 context Lorg/jruby/runtime/ThreadContext;
0 5 2 backlog Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"listen"})
MethodParameters:
Name Flags
context
backlog
public org.jruby.runtime.builtin.IRubyObject connect_nonblock(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "server socket cannot connect"
invokestatic org.jruby.ext.socket.SocketUtils.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;)Ljava/lang/RuntimeException;
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 arg Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(notImplemented = true)
MethodParameters:
Name Flags
context
arg
public org.jruby.runtime.builtin.IRubyObject connect(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "server socket cannot connect"
invokestatic org.jruby.ext.socket.SocketUtils.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;)Ljava/lang/RuntimeException;
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 arg Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(notImplemented = true)
MethodParameters:
Name Flags
context
arg
public org.jruby.runtime.builtin.IRubyObject bind(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.RubyFixnum.zero:(Lorg/jruby/Ruby;)Lorg/jruby/RubyFixnum;
invokevirtual org.jruby.ext.socket.RubyServerSocket.bind:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 addr Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
addr
public org.jruby.runtime.builtin.IRubyObject bind(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
instanceof org.jruby.ext.socket.Addrinfo
ifeq 6
1: aload 2
checkcast org.jruby.ext.socket.Addrinfo
astore 5
start local 5 2: aload 5
aload 1
invokevirtual org.jruby.ext.socket.Addrinfo.ip_p:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
invokeinterface org.jruby.runtime.builtin.IRubyObject.isTrue:()Z
ifne 4
3: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "not an INET or INET6 address: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals: org.jruby.ext.socket.RubyServerSocket org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject top org.jruby.ext.socket.Addrinfo
StackMap stack:
new java.net.InetSocketAddress
dup
aload 5
invokevirtual org.jruby.ext.socket.Addrinfo.getInetAddress:()Ljava/net/InetAddress;
invokevirtual java.net.InetAddress.getHostAddress:()Ljava/lang/String;
aload 5
invokevirtual org.jruby.ext.socket.Addrinfo.getPort:()I
invokespecial java.net.InetSocketAddress.<init>:(Ljava/lang/String;I)V
astore 4
end local 5 start local 4 5: goto 7
end local 4 6: StackMap locals: org.jruby.ext.socket.RubyServerSocket org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 1
aload 2
invokestatic org.jruby.util.io.Sockaddr.addressFromSockaddr_in:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Ljava/net/InetSocketAddress;
astore 4
start local 4 7: StackMap locals: java.net.InetSocketAddress
StackMap stack:
aload 0
aload 1
aload 0
invokevirtual org.jruby.ext.socket.RubyServerSocket.getChannel:()Ljava/nio/channels/Channel;
aload 4
aload 3
invokestatic org.jruby.RubyFixnum.fix2int:(Lorg/jruby/runtime/builtin/IRubyObject;)I
invokevirtual org.jruby.ext.socket.RubyServerSocket.doBind:(Lorg/jruby/runtime/ThreadContext;Ljava/nio/channels/Channel;Ljava/net/InetSocketAddress;I)V
8: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.RubyFixnum.zero:(Lorg/jruby/Ruby;)Lorg/jruby/RubyFixnum;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 9 1 context Lorg/jruby/runtime/ThreadContext;
0 9 2 addr Lorg/jruby/runtime/builtin/IRubyObject;
0 9 3 backlog Lorg/jruby/runtime/builtin/IRubyObject;
5 6 4 iaddr Ljava/net/InetSocketAddress;
7 9 4 iaddr Ljava/net/InetSocketAddress;
2 5 5 addrInfo Lorg/jruby/ext/socket/Addrinfo;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
addr
backlog
public org.jruby.runtime.builtin.IRubyObject accept(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_1
invokestatic org.jruby.ext.socket.RubyServerSocket.doAccept:(Lorg/jruby/ext/socket/RubySocket;Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject accept_nonblock(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.ext.socket.RubyServerSocket.accept_nonblock:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject accept_nonblock(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 1
aload 2
invokestatic org.jruby.ext.socket.RubyServerSocket.extractExceptionArg:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Z
invokestatic org.jruby.ext.socket.RubyServerSocket.doAcceptNonblock:(Lorg/jruby/ext/socket/RubySocket;Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 opts Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
opts
protected org.jruby.util.io.ChannelFD initChannelFD(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)Lorg/jruby/util/io/ChannelFD;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.ext.socket.RubyServerSocket.soType:Ljnr/constants/platform/Sock;
getstatic jnr.constants.platform.Sock.SOCK_STREAM:Ljnr/constants/platform/Sock;
if_acmpne 3
1: invokestatic java.nio.channels.ServerSocketChannel.open:()Ljava/nio/channels/ServerSocketChannel;
astore 2
start local 2 2: goto 4
end local 2 3: StackMap locals:
StackMap stack:
aload 1
new java.lang.StringBuilder
dup
ldc "unsupported server socket type `"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.jruby.ext.socket.RubyServerSocket.soType:Ljnr/constants/platform/Sock;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "'"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newArgumentError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
start local 2 4: StackMap locals: java.nio.channels.Channel
StackMap stack:
aload 1
aload 2
invokestatic org.jruby.ext.socket.RubyServerSocket.newChannelFD:(Lorg/jruby/Ruby;Ljava/nio/channels/Channel;)Lorg/jruby/util/io/ChannelFD;
5: areturn
end local 2 6: StackMap locals: org.jruby.ext.socket.RubyServerSocket org.jruby.Ruby
StackMap stack: java.io.IOException
astore 3
start local 3 7: aload 1
new java.lang.StringBuilder
dup
ldc "initialize: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.io.IOException.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 3
invokestatic org.jruby.ext.socket.RubyServerSocket.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/RuntimeException;
athrow
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 8 1 runtime Lorg/jruby/Ruby;
2 3 2 channel Ljava/nio/channels/Channel;
4 6 2 channel Ljava/nio/channels/Channel;
7 8 3 e Ljava/io/IOException;
Exception table:
from to target type
0 5 6 Class java.io.IOException
MethodParameters:
Name Flags
runtime
public static org.jruby.runtime.builtin.IRubyObject doAcceptNonblock(org.jruby.ext.socket.RubySocket, org.jruby.runtime.ThreadContext, boolean);
descriptor: (Lorg/jruby/ext/socket/RubySocket;Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=12, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.jruby.ext.socket.RubySocket.getChannel:()Ljava/nio/channels/Channel;
astore 3
start local 3 1: aload 3
instanceof java.nio.channels.SelectableChannel
ifeq 24
2: aload 3
checkcast java.nio.channels.SelectableChannel
astore 4
start local 4 3: aload 4
invokevirtual java.nio.channels.SelectableChannel.blockingLock:()Ljava/lang/Object;
dup
astore 5
monitorenter
4: aload 4
invokevirtual java.nio.channels.SelectableChannel.isBlocking:()Z
istore 6
start local 6 5: aload 4
iconst_0
invokevirtual java.nio.channels.SelectableChannel.configureBlocking:(Z)Ljava/nio/channels/SelectableChannel;
pop
6: aload 0
aload 1
iload 2
invokestatic org.jruby.ext.socket.RubyServerSocket.doAccept:(Lorg/jruby/ext/socket/RubySocket;Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
astore 7
start local 7 7: aload 7
instanceof org.jruby.ext.socket.RubySocket
ifne 10
aload 7
astore 11
8: aload 4
iload 6
invokevirtual java.nio.channels.SelectableChannel.configureBlocking:(Z)Ljava/nio/channels/SelectableChannel;
pop
aload 5
monitorexit
9: aload 11
areturn
10: StackMap locals: org.jruby.ext.socket.RubySocket org.jruby.runtime.ThreadContext int java.nio.channels.Channel java.nio.channels.SelectableChannel java.lang.Object int org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 7
checkcast org.jruby.ext.socket.RubySocket
invokevirtual org.jruby.ext.socket.RubySocket.getChannel:()Ljava/nio/channels/Channel;
checkcast java.nio.channels.SocketChannel
astore 8
start local 8 11: aload 8
invokevirtual java.nio.channels.SocketChannel.socket:()Ljava/net/Socket;
invokevirtual java.net.Socket.getRemoteSocketAddress:()Ljava/net/SocketAddress;
checkcast java.net.InetSocketAddress
astore 9
start local 9 12: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
13: aload 7
14: aload 1
aload 9
invokestatic org.jruby.util.io.Sockaddr.packSockaddrFromAddress:(Lorg/jruby/runtime/ThreadContext;Ljava/net/InetSocketAddress;)Lorg/jruby/runtime/builtin/IRubyObject;
15: invokevirtual org.jruby.Ruby.newArray:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
astore 11
16: aload 4
iload 6
invokevirtual java.nio.channels.SelectableChannel.configureBlocking:(Z)Ljava/nio/channels/SelectableChannel;
pop
17: aload 5
monitorexit
18: aload 11
areturn
end local 9 end local 8 end local 7 19: StackMap locals: org.jruby.ext.socket.RubySocket org.jruby.runtime.ThreadContext int java.nio.channels.Channel java.nio.channels.SelectableChannel java.lang.Object int
StackMap stack: java.lang.Throwable
astore 10
20: aload 4
iload 6
invokevirtual java.nio.channels.SelectableChannel.configureBlocking:(Z)Ljava/nio/channels/SelectableChannel;
pop
21: aload 10
athrow
end local 6 22: StackMap locals: org.jruby.ext.socket.RubySocket org.jruby.runtime.ThreadContext int java.nio.channels.Channel java.nio.channels.SelectableChannel java.lang.Object
StackMap stack: java.lang.Throwable
aload 5
monitorexit
23: athrow
end local 4 24: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.newErrnoENOPROTOOPTError:()Lorg/jruby/exceptions/RaiseException;
athrow
end local 3 25: StackMap locals: org.jruby.ext.socket.RubySocket org.jruby.runtime.ThreadContext int
StackMap stack: java.io.IOException
astore 3
start local 3 26: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 3
invokevirtual java.io.IOException.getLocalizedMessage:()Ljava/lang/String;
aload 3
invokestatic org.jruby.ext.socket.RubyServerSocket.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/RuntimeException;
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 sock Lorg/jruby/ext/socket/RubySocket;
0 27 1 context Lorg/jruby/runtime/ThreadContext;
0 27 2 ex Z
1 25 3 channel Ljava/nio/channels/Channel;
3 24 4 selectable Ljava/nio/channels/SelectableChannel;
5 22 6 oldBlocking Z
7 19 7 socket Lorg/jruby/runtime/builtin/IRubyObject;
11 19 8 socketChannel Ljava/nio/channels/SocketChannel;
12 19 9 addr Ljava/net/InetSocketAddress;
26 27 3 e Ljava/io/IOException;
Exception table:
from to target type
5 8 19 any
10 16 19 any
4 9 22 any
10 18 22 any
19 23 22 any
0 9 25 Class java.io.IOException
10 18 25 Class java.io.IOException
19 25 25 Class java.io.IOException
MethodParameters:
Name Flags
sock
context
ex
public static org.jruby.runtime.builtin.IRubyObject doAccept(org.jruby.ext.socket.RubySocket, org.jruby.runtime.ThreadContext, boolean);
descriptor: (Lorg/jruby/ext/socket/RubySocket;Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 3
start local 3 1: aload 0
invokevirtual org.jruby.ext.socket.RubySocket.getChannel:()Ljava/nio/channels/Channel;
astore 4
start local 4 2: aload 4
instanceof java.nio.channels.ServerSocketChannel
ifeq 13
3: aload 0
invokevirtual org.jruby.ext.socket.RubySocket.getChannel:()Ljava/nio/channels/Channel;
checkcast java.nio.channels.ServerSocketChannel
astore 5
start local 5 4: aload 5
invokevirtual java.nio.channels.ServerSocketChannel.accept:()Ljava/nio/channels/SocketChannel;
astore 6
start local 6 5: aload 6
ifnonnull 9
6: iload 2
ifne 8
aload 3
ldc "wait_readable"
invokevirtual org.jruby.Ruby.newSymbol:(Ljava/lang/String;)Lorg/jruby/RubySymbol;
7: areturn
8: StackMap locals: org.jruby.ext.socket.RubySocket org.jruby.runtime.ThreadContext int org.jruby.Ruby java.nio.channels.Channel java.nio.channels.ServerSocketChannel java.nio.channels.SocketChannel
StackMap stack:
aload 3
ldc "accept(2) would block"
invokevirtual org.jruby.Ruby.newErrnoEAGAINReadableError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
9: StackMap locals:
StackMap stack:
new org.jruby.ext.socket.RubySocket
dup
aload 3
aload 3
ldc "Socket"
invokevirtual org.jruby.Ruby.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
invokespecial org.jruby.ext.socket.RubySocket.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
astore 7
start local 7 10: aload 7
aload 3
aload 0
aload 6
invokevirtual org.jruby.ext.socket.RubySocket.initFromServer:(Lorg/jruby/Ruby;Lorg/jruby/ext/socket/RubySocket;Ljava/nio/channels/SocketChannel;)V
11: aload 3
aload 7
new org.jruby.ext.socket.Addrinfo
dup
aload 3
aload 3
ldc "Addrinfo"
invokevirtual org.jruby.Ruby.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
aload 6
invokevirtual java.nio.channels.SocketChannel.getRemoteAddress:()Ljava/net/SocketAddress;
invokespecial org.jruby.ext.socket.Addrinfo.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Ljava/net/SocketAddress;)V
invokevirtual org.jruby.Ruby.newArray:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
12: areturn
end local 7 end local 6 end local 5 13: StackMap locals:
StackMap stack:
aload 3
invokevirtual org.jruby.Ruby.newErrnoENOPROTOOPTError:()Lorg/jruby/exceptions/RaiseException;
athrow
14: StackMap locals:
StackMap stack: java.nio.channels.IllegalBlockingModeException
pop
15: iload 2
ifne 16
aload 3
ldc "wait_readable"
invokevirtual org.jruby.Ruby.newSymbol:(Ljava/lang/String;)Lorg/jruby/RubySymbol;
areturn
16: StackMap locals:
StackMap stack:
aload 3
ldc "accept(2) would block"
invokevirtual org.jruby.Ruby.newErrnoEAGAINReadableError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
17: StackMap locals:
StackMap stack: java.io.IOException
astore 5
start local 5 18: aload 3
aload 5
invokevirtual java.io.IOException.getLocalizedMessage:()Ljava/lang/String;
aload 5
invokestatic org.jruby.ext.socket.RubyServerSocket.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/RuntimeException;
athrow
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 sock Lorg/jruby/ext/socket/RubySocket;
0 19 1 context Lorg/jruby/runtime/ThreadContext;
0 19 2 ex Z
1 19 3 runtime Lorg/jruby/Ruby;
2 19 4 channel Ljava/nio/channels/Channel;
4 13 5 serverChannel Ljava/nio/channels/ServerSocketChannel;
5 13 6 socket Ljava/nio/channels/SocketChannel;
10 13 7 rubySocket Lorg/jruby/ext/socket/RubySocket;
18 19 5 e Ljava/io/IOException;
Exception table:
from to target type
2 7 14 Class java.nio.channels.IllegalBlockingModeException
8 12 14 Class java.nio.channels.IllegalBlockingModeException
13 14 14 Class java.nio.channels.IllegalBlockingModeException
2 7 17 Class java.io.IOException
8 12 17 Class java.io.IOException
13 14 17 Class java.io.IOException
MethodParameters:
Name Flags
sock
context
ex
private void doBind(org.jruby.runtime.ThreadContext, java.nio.channels.Channel, java.net.InetSocketAddress, int);
descriptor: (Lorg/jruby/runtime/ThreadContext;Ljava/nio/channels/Channel;Ljava/net/InetSocketAddress;I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=7, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 5
start local 5 1: aload 2
instanceof java.nio.channels.ServerSocketChannel
ifeq 5
2: aload 2
checkcast java.nio.channels.ServerSocketChannel
invokevirtual java.nio.channels.ServerSocketChannel.socket:()Ljava/net/ServerSocket;
astore 6
start local 6 3: aload 6
aload 3
iload 4
invokevirtual java.net.ServerSocket.bind:(Ljava/net/SocketAddress;I)V
end local 6 4: goto 14
5: StackMap locals: org.jruby.Ruby
StackMap stack:
aload 5
invokevirtual org.jruby.Ruby.newErrnoENOPROTOOPTError:()Lorg/jruby/exceptions/RaiseException;
athrow
6: StackMap locals:
StackMap stack: java.net.UnknownHostException
pop
7: aload 5
ldc "bind(2): unknown host"
invokestatic org.jruby.ext.socket.SocketUtils.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;)Ljava/lang/RuntimeException;
athrow
8: StackMap locals:
StackMap stack: java.net.SocketException
astore 6
start local 6 9: aload 5
aload 6
ldc "bind(2)"
aload 3
invokestatic org.jruby.ext.socket.RubyServerSocket.buildSocketException:(Lorg/jruby/Ruby;Ljava/net/SocketException;Ljava/lang/String;Ljava/net/SocketAddress;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 6 10: StackMap locals:
StackMap stack: java.io.IOException
astore 6
start local 6 11: aload 5
ldc "bind(2): name or service not known"
aload 6
invokestatic org.jruby.ext.socket.RubyServerSocket.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/RuntimeException;
athrow
end local 6 12: StackMap locals:
StackMap stack: java.lang.IllegalArgumentException
astore 6
start local 6 13: aload 5
aload 6
invokevirtual java.lang.IllegalArgumentException.getMessage:()Ljava/lang/String;
aload 6
invokestatic org.jruby.ext.socket.RubyServerSocket.sockerr:(Lorg/jruby/Ruby;Ljava/lang/String;Ljava/lang/Exception;)Ljava/lang/RuntimeException;
athrow
end local 6 14: StackMap locals:
StackMap stack:
return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/jruby/ext/socket/RubyServerSocket;
0 15 1 context Lorg/jruby/runtime/ThreadContext;
0 15 2 channel Ljava/nio/channels/Channel;
0 15 3 iaddr Ljava/net/InetSocketAddress;
0 15 4 backlog I
1 15 5 runtime Lorg/jruby/Ruby;
3 4 6 socket Ljava/net/ServerSocket;
9 10 6 e Ljava/net/SocketException;
11 12 6 e Ljava/io/IOException;
13 14 6 e Ljava/lang/IllegalArgumentException;
Exception table:
from to target type
1 6 6 Class java.net.UnknownHostException
1 6 8 Class java.net.SocketException
1 6 10 Class java.io.IOException
1 6 12 Class java.lang.IllegalArgumentException
MethodParameters:
Name Flags
context
channel
iaddr
backlog
}
SourceFile: "RubyServerSocket.java"
NestMembers:
org.jruby.ext.socket.RubyServerSocket$1
InnerClasses:
public final ID = org.jruby.common.IRubyWarnings$ID of org.jruby.common.IRubyWarnings
org.jruby.ext.socket.RubyServerSocket$1
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyClass(name = {"Socket"}, parent = "BasicSocket", include = {"Socket::Constants"})