code: func (cli *Client) handlePUBREC(p packet.Packet) error {
  	// Lock for update.
  	cli.muSess.Lock()
  
  	// Unlock.
  	defer cli.muSess.Unlock()
  
  	// Extract the Packet Identifier of the Packet.
  	id := p.(*packet.PUBREC).PacketID
  
  	// Validate the Packet Identifier.
  	if err := cli.validatePacketID(cli.sess.sendingPackets, id, packet.TypePUBLISH); err != nil {
  		return err
  	}
  
  	// Create a PUBREL Packet.
  	pubrel, err := packet.NewPUBREL(&packet.PUBRELOptions{
  		PacketID: id,
  	})
  	if err != nil {
  		return err
  	}
  
  	// Set the PUBREL Packet to the Session.
  	cli.sess.sendingPackets[id] = pubrel
  
  	// Send the Packet to the Server.
  	cli.conn.send <- pubrel
  
  	return nil
  }
docs: // handlePUBREC handles the PUBREC Packet.