docs: private void writeRequestJoinResponse(
              int hostId,
              JoinAcceptor.PleaDecision decision,
              SocketChannel socket,
              MessagingChannel messagingChannel) throws Exception {
  
          JSONObject jsObj = new JSONObject();
  
          jsObj.put(SocketJoiner.ACCEPTED, decision.accepted);
          if (decision.accepted) {
              /*
               * Tell the new node what its host id is
               */
              jsObj.put(SocketJoiner.NEW_HOST_ID, hostId);
  
              /*
               * Echo back the address that the node connected from
               */
              jsObj.put(SocketJoiner.REPORTED_ADDRESS,
                        ((InetSocketAddress) socket.socket().getRemoteSocketAddress()).getAddress().getHostAddress());
  
              /*
               * Create an array containing an id for every node including this one
               * even though the connection has already been made
               */
              JSONArray jsArray = new JSONArray();
              JSONObject hostObj = new JSONObject();
              hostObj.put(SocketJoiner.HOST_ID, getHostId());
              hostObj.put(SocketJoiner.ADDRESS,
                          m_config.internalInterface.isEmpty() ?
                          socket.socket().getLocalAddress().getHostAddress() :
                          m_config.internalInterface);
              hostObj.put(SocketJoiner.PORT, m_config.internalPort);
              jsArray.put(hostObj);
              for (Entry<Integer, Collection<ForeignHost>> entry : m_foreignHosts.asMap().entrySet()) {
                  if (entry.getValue().isEmpty()) {
                      continue;
                  }
                  int hsId = entry.getKey();
                  Iterator<ForeignHost> it = entry.getValue().iterator();
                  // all fhs to same host have the same address and port
                  ForeignHost fh = it.next();
                  hostObj = new JSONObject();
                  hostObj.put(SocketJoiner.HOST_ID, hsId);
                  hostObj.put(SocketJoiner.ADDRESS,
                          fh.m_listeningAddress.getAddress().getHostAddress());
                  hostObj.put(SocketJoiner.PORT, fh.m_listeningAddress.getPort());
                  jsArray.put(hostObj);
              }
              jsObj.put(SocketJoiner.HOSTS, jsArray);
          }
          else {
              jsObj.put(SocketJoiner.REASON, decision.errMsg);
              jsObj.put(SocketJoiner.MAY_RETRY, decision.mayRetry);
          }
  
          byte messageBytes[] = jsObj.toString(4).getBytes("UTF-8");
          ByteBuffer message = ByteBuffer.allocate(4 + messageBytes.length);
          message.putInt(messageBytes.length);
          message.put(messageBytes).flip();
          messagingChannel.writeMessage(message);
      }