if (socket == null) {
// This appears to be undocumented in JDK; null as a sentinel value
// for a nonblocking accept with nothing available. We raise for Ruby.
// indicates that no connection is available in non-blocking mode
throw runtime.newErrnoEAGAINReadableError("accept(2) would block");
}
RubySocket rubySocket = new RubySocket(runtime, runtime.getClass("Socket"));
rubySocket.initFromServer(runtime, this, socket);