code: public void link(final OtpErlangPid to) throws OtpErlangExit {
          try {
              final String node = to.node();
              if (node.equals(home.node())) {
                  if (!home.deliver(new OtpMsg(OtpMsg.linkTag, self, to))) {
                      throw new OtpErlangExit("noproc", to);
                  }
              } else {
                  final OtpCookedConnection conn = home.getConnection(node);
                  if (conn != null) {
                      conn.link(self, to);
                  } else {
                      throw new OtpErlangExit("noproc", to);
                  }
              }
          } catch (final OtpErlangExit e) {
              throw e;
          } catch (final Exception e) {
          }
  
          links.addLink(self, to);
      }
docs: <p>
  Link to a remote mailbox or Erlang process. Links are idempotent, calling
  this method multiple times will not result in more than one link being
  created.
  </p>
  
  <p>
  If the remote process subsequently exits or the mailbox is closed, a
  subsequent attempt to retrieve a message through this mailbox will cause
  an {@link OtpErlangExit OtpErlangExit} exception to be raised. Similarly,
  if the sending mailbox is closed, the linked mailbox or process will
  receive an exit signal.
  </p>
  
  <p>
  If the remote process cannot be reached in order to set the link, the
  exception is raised immediately.
  </p>
  
  @param to
  the {@link OtpErlangPid pid} representing the object to link
  to.
  
  @exception OtpErlangExit
  if the {@link OtpErlangPid pid} referred to does not exist
  or could not be reached.