code: @Override
      @FFDCIgnore(IOException.class)
      public Socket createSelfConnection(InetAddress address, int port) throws IOException {
          try {
              SocketInfo info = null;
              for (SocketInfo test : socketInfos) {
                  if (test.port == port && test.addr.equals(address)) {
                      info = test;
                  }
              }
              if (info == null) {
                  throw new IOException("No inbound socket matching address " + address + " and port " + port);
              }
              OptionsKey key = info.key;
              // the requires information tells us whether we created a plain or SSL listener.  We need to create one
              // of the matching type.
  
              if ((NoProtection.value & key.requires) == NoProtection.value) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                      Tr.debug(tc, "Created plain endpoint to " + address.getHostName() + ":" + port);
                  return new Socket(address, port);
              } else {
                  return createSSLSocket(address.getHostName(), port, info.sslConfigName);
              }
          } catch (IOException ex) {
              Tr.error(tc, "Exception creating a client socket to " + address.getHostName() + ":" + port, ex);
              throw ex;
          }
      }
docs: Create a loopback connection to the hosting
  ORB.
  
  @param address The address information for the server.
  @param port The target port.
  
  @return An appropriately configured socket based on the
  listener characteristics.
  @exception IOException
  @exception ConnectException