code: public void write_port(final String node, final int id, final int creation) {
  	write1(OtpExternal.portTag);
  	write_atom(node);
  	write4BE(id & 0xfffffff); // 28 bits
  	write1(creation & 0x3); // 2 bits
      }
docs: Write an Erlang port to the stream.
  
  @param node
  the nodename.
  
  @param id
  an arbitrary number. Only the low order 28 bits will be used.
  
  @param creation
  another arbitrary number. Only the low order 2 bits will
  be used.